From 42689729514dec4a17a7b9e3b55286e99b469bc3 Mon Sep 17 00:00:00 2001 From: sanemat Date: Thu, 1 Oct 2009 02:24:46 +0900 Subject: [PATCH 1/1] assign variable in sample01 other method have set_or_default, and it assigns $name. but are_you_ok and how_are_you is not assigned. so those view footer show "undefined variable", I assign it. --- examples/example01/index.php | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/examples/example01/index.php b/examples/example01/index.php index 3cbfc8c..ce2326b 100644 --- a/examples/example01/index.php +++ b/examples/example01/index.php @@ -40,6 +40,7 @@ dispatch('/are_you_ok/:name', 'are_you_ok'); if(empty($name)) halt(NOT_FOUND, "Undefined name."); } + set('name', $name); return html("Are you ok $name ?"); } @@ -50,6 +51,7 @@ dispatch('/how_are_you/:name', 'how_are_you'); if(empty($name)) halt(NOT_FOUND, "Undefined name."); # you can call an other controller function if you want if(strlen($name) < 4) return are_you_ok($name); + set('name', $name); return html("I hope you are fine, $name."); } -- 1.5.5.6