summaryrefslogblamecommitdiff
path: root/pkgs/webapps/phpldapadmin/ldap-php7_2.patch
blob: 40ee0555ef016a9ab52471776efb326da8695dda (plain) (tree)





























                                                                                                      
diff -wbBur phpldapadmin.org/lib/functions.php phpldapadmin/lib/functions.php
--- phpldapadmin.org/lib/functions.php	2017-02-02 10:03:58.000000000 -0700
+++ phpldapadmin/lib/functions.php	2018-01-23 06:18:31.118312887 -0700
@@ -51,7 +51,7 @@
 /**
  * Loads class definition
  */
-function __autoload($className) {
+spl_autoload_register(function($className) {
 	if (file_exists(HOOKSDIR."classes/$className.php"))
 		require_once(HOOKSDIR."classes/$className.php");
 	elseif (file_exists(LIBDIR."$className.php"))
@@ -64,7 +64,7 @@
 			'body'=>sprintf('%s: %s [%s]',
 				__METHOD__,_('Called to load a class that cant be found'),$className),
 			'type'=>'error'));
-}
+});
 
 /**
  * Strips all slashes from the specified array in place (pass by ref).
@@ -1083,7 +1083,7 @@
 
 		$code .= 'return $c;';
 
-		$CACHE[$sortby] = create_function('$a, $b',$code);
+		eval("\$CACHE[\$sortby] = function(\$a, \$b) { $code; };");
 	}
 
 	uasort($data,$CACHE[$sortby]);