fixing warnings generated by php 5.3.8 is_a($obj) trying to autoload huge strings

This commit is contained in:
Ralf Becker 2011-11-15 12:23:29 +00:00
parent 923c78940e
commit c6280b9874

View File

@ -1438,6 +1438,9 @@ function try_lang($key,$vars=null)
*/ */
function __autoload($class) function __autoload($class)
{ {
// fixing warnings generated by php 5.3.8 is_a($obj) trying to autoload huge strings
if (strlen($class) > 40) return;
$components = explode('_',$class); $components = explode('_',$class);
$app = array_shift($components); $app = array_shift($components);
// classes using the new naming schema app_class_name, eg. admin_cmd // classes using the new naming schema app_class_name, eg. admin_cmd