cvs: pear-core /PEAR2 Autoload.php
| From: | Greg Beaver | Date: | Tue, 23 Jan 2007 04:21:50 +0000 |
| Subject: | cvs: pear-core /PEAR2 Autoload.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-5357@lists.php.net to get a copy of this message | ||
cellog Tue Jan 23 04:21:50 2007 UTC
Modified files:
/pear-core/PEAR2 Autoload.php
Log:
fix Autoload.php to allow multiple inclusion (although this
is discouraged for obvious reasons)
http://cvs.php.net/viewvc.cgi/pear-core/PEAR2/Autoload.php?r1=1.1&r2=1.2&diff_format=u
Index: pear-core/PEAR2/Autoload.php
diff -u pear-core/PEAR2/Autoload.php:1.1 pear-core/PEAR2/Autoload.php:1.2
--- pear-core/PEAR2/Autoload.php:1.1 Thu Dec 28 20:42:31 2006
+++ pear-core/PEAR2/Autoload.php Tue Jan 23 04:21:50 2007
@@ -1,6 +1,9 @@
<?php
-if (function_exists('PEAR2_Autoload')) return;
-function PEAR2_Autoload($class)
-{
- require str_replace('_', '/', $class) . '.php';
+if (function_exists('PEAR2_Autoload')) {
+ return;
+} else {
+ function PEAR2_Autoload($class)
+ {
+ require str_replace('_', '/', $class) . '.php';
+ }
}
\ No newline at end of file