File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -99,15 +99,11 @@ public static function iniSet(string $phpIniKey, string $newValue): bool
9999 * Alias fo ini_get function
100100 *
101101 * @param string $varName
102- * @return string|null
102+ * @return string
103103 */
104- public static function iniGet (string $ varName ): ? string
104+ public static function iniGet (string $ varName ): string
105105 {
106- if (self ::isFunc ('ini_get ' )) {
107- return (string )ini_get ($ varName );
108- }
109-
110- return null ;
106+ return (string )ini_get ($ varName );
111107 }
112108
113109 /**
@@ -118,7 +114,12 @@ public static function iniGet(string $varName): ?string
118114 */
119115 public static function isFunc ($ funcName ): bool
120116 {
121- return is_callable ($ funcName ) || (is_string ($ funcName ) && function_exists ($ funcName ));
117+ $ isEnabled = true ;
118+ if (is_string ($ funcName )) {
119+ $ isEnabled = stripos (self ::iniGet ('disable_functions ' ), strtolower (trim ($ funcName ))) === false ;
120+ }
121+
122+ return $ isEnabled && (is_callable ($ funcName ) || (is_string ($ funcName ) && function_exists ($ funcName )));
122123 }
123124
124125 /**
You can’t perform that action at this time.
0 commit comments