You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by ih...@apache.org on 2011/05/28 10:18:17 UTC
svn commit: r1128568 - /logging/log4php/trunk/src/main/php/Logger.php
Author: ihabunek
Date: Sat May 28 08:18:17 2011
New Revision: 1128568
URL: http://svn.apache.org/viewvc?rev=1128568&view=rev
Log:
LOG4PHP-129: Log4PHP causes odd errors in the underlying application if used with source having an existing __autoload function
Modified:
logging/log4php/trunk/src/main/php/Logger.php
Modified: logging/log4php/trunk/src/main/php/Logger.php
URL: http://svn.apache.org/viewvc/logging/log4php/trunk/src/main/php/Logger.php?rev=1128568&r1=1128567&r2=1128568&view=diff
==============================================================================
--- logging/log4php/trunk/src/main/php/Logger.php (original)
+++ logging/log4php/trunk/src/main/php/Logger.php Sat May 28 08:18:17 2011
@@ -28,6 +28,10 @@
*/
if (!defined('LOG4PHP_DIR')) define('LOG4PHP_DIR', dirname(__FILE__));
+if (function_exists('__autoload')) {
+ trigger_error("log4php: It looks like your code is using an __autoload() function. log4php uses spl_autoload_register() which will bypass your __autoload() function and may break autoloading.", E_USER_WARNING);
+}
+
spl_autoload_register(array('Logger', 'autoload'));
/**