summaryrefslogtreecommitdiff
path: root/pkgs/webapps/phpldapadmin/ldap-php7_2.patch
blob: 40ee0555ef016a9ab52471776efb326da8695dda (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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]);