newhck / php-form-builder-class

Automatically exported from code.google.com/p/php-form-builder-class
GNU General Public License v3.0
0 stars 0 forks source link

autoloader call overwrites any existing __autloload function #138

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I have a project where I am using my own version of the __autoload function.  
Once your code executes PHP unregisters my __autoload function.  This is 
causing my classes not to be found.
A simple fix for this would be to check if spl_autoload_functions() returns 
__autoload in its array and include __autoload within your code.  
To correct this on my local copy (version 2.1 on winxp) I've updated Form.php 
with
spl_autoload_register("PFBC\Load");
if(in_array("__autoload",spl_autoload_functions()));
spl_autoload_register("__autoload");

Original issue reported on code.google.com by cjohn...@gmail.com on 15 Jun 2011 at 6:21

GoogleCodeExporter commented 8 years ago
Thanks for the feedback.  This changed has been committed in r527 and will be 
included in the next version release (most likely next month).

- Andrew

Original comment by ajporterfield@gmail.com on 16 Jun 2011 at 1:39

GoogleCodeExporter commented 8 years ago

Original comment by ajporterfield@gmail.com on 16 Jun 2011 at 1:39