forked from laruence/yaf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed Bug #70913 (Segfault while new Yaf_Controller)
Showing
2 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--TEST-- | ||
Bug #70913 (Segfault while new Yaf_Controller) | ||
--SKIPIF-- | ||
<?php if (!extension_loaded("yaf")) print "skip"; ?> | ||
--INI-- | ||
yaf.use_spl_autoload=1 | ||
yaf.lowcase_path=0 | ||
yaf.throw_exception=0 | ||
yaf.catch_exception=1 | ||
yaf.use_namespace=0 | ||
--FILE-- | ||
<?php | ||
require "build.inc"; | ||
startup(); | ||
|
||
$config = array( | ||
"application" => array( | ||
"directory" => APPLICATION_PATH, | ||
), | ||
); | ||
|
||
file_put_contents(APPLICATION_PATH . "/controllers/Index.php", <<<PHP | ||
<?php | ||
class IndexController extends Yaf_Controller_Abstract { | ||
public function indexAction() { | ||
new SecondController(\$this->getRequest(), \$this->getResponse(), \$this->getView()); | ||
} | ||
} | ||
PHP | ||
); | ||
|
||
file_put_contents(APPLICATION_PATH . "/controllers/Second.php", <<<PHP | ||
<?php | ||
class SecondController extends Yaf_Controller_Abstract { | ||
} | ||
PHP | ||
); | ||
|
||
file_put_contents(APPLICATION_PATH . "/views/index/index.phtml", "Okey"); | ||
|
||
$app = new Yaf_Application($config); | ||
$response = $app->run(); | ||
echo "Okey"; | ||
?> | ||
--CLEAN-- | ||
<?php | ||
require "build.inc"; | ||
shutdown(); | ||
?> | ||
--EXPECTF-- | ||
Fatal error: Call to private Yaf_Controller_Abstract::__construct() from context 'IndexController' in %sIndex.php on line %d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters