possible _get_php_resource bug
| From: | Greg Beaver | Date: | Sun, 16 Feb 2003 05:09:23 +0000 |
| Subject: | possible _get_php_resource bug | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-701@lists.php.net to get a copy of this message | ||
Hi,
While typing in phpdoc comments, I noticed that Smarty::_get_php_resource()
refers to a variable "$template_source" that is never defined. This will at
least cause a notice with E_ALL, and is probably a bug. The bug will only
be triggered by a non-standard resource:
} else if ($resource_type != 'file') {
$readable = true;
$resource_func =
$this->_plugins['resource'][$resource_type][0][0];
$readable = $resource_func($resource_name, $template_source,
$this);
}
and at the function end:
if ($resource_type == 'file') {
$php_resource = $resource_name;
} else {
$php_resource = $template_source;
}
Take care,
Greg
--
phpDocumentor
http://www.phpdoc.org