the spl_autoload_register() problem ?

45 views
Skip to first unread message

xuanyan

unread,
Nov 2, 2009, 5:08:56 AM11/2/09
to Smarty Developers
Hi,
First of all thanks for the excellent work on Smarty, keep up the
good work, I really appreciate it!

Today,I checkout the Smarty3 to the version 3295, well, it not work
correctly in my project, i find the problem is in the Smarty.class.php
line 94 , if i have already register a spl_autoload functions, then
the spl_autoload_register() can't register the function 'spl_autoload'
correctly... and i fix it by change the code 'spl_autoload_register()'
to "spl_autoload_register('spl_autoload')";
there are two test:
-------------------------
function a() {

}
spl_autoload_register('a');
spl_autoload_register();
print_r(spl_autoload_functions());exit;
// the result is only the function 'a'
----------------------------------
spl_autoload_register();
print_r(spl_autoload_functions());exit;
// the result is has the function 'spl_autoload' ...


i think it is the spl_autoload bug...

plz check it ~ thanks

Monte Ohrt

unread,
Nov 2, 2009, 8:32:47 AM11/2/09
to smarty-d...@googlegroups.com
xuanyan,

There was a patch committed to the Beta SVN to address this yesterday.

Monte
Reply all
Reply to author
Forward
0 new messages