Package: smarty3
Version: 3.1.21-1
Severity: normal

Dear Maintainer,

If you do something as simple as this:
<?php
$smarty_dir = "/usr/share/php/smarty3/";

require_once("$smarty_dir/Smarty.class.php");
$smarty = new Smarty;

smarty_function($smarty);

function smarty_function($smarty)
{
        $smarty->trigger_error("Test");
}
?>

You get this error:

PHP Fatal error:  Uncaught  --> Smarty: Call of unknown method 'trigger_error'. 
<-- \n  thrown in 
/usr/share/php/smarty3/sysplugins/smarty_internal_templatebase.php on line 858

We've noticed that the trigger_error function is also called by 
Smarty.class.php but it's not defined anywhere inside this class nor its 
parents, in fact it's defined in its child SmartyBC.class.php.

To solve this problem, we have moved the definition of the function inside the 
Smarty.class.php.

-- System Information:
Debian Release: 8.2
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF8, LC_CTYPE=es_ES.UTF8 (charmap=UTF-8) (ignored: LC_ALL 
set to es_ES.UTF8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages smarty3 depends on:
ii  php5      5.6.12+dfsg-0+deb8u1
ii  php5-cli  5.6.12+dfsg-0+deb8u1

smarty3 recommends no packages.

smarty3 suggests no packages.

-- no debconf information

Reply via email to