Quellcode durchsuchen

add/remove_integration_hooks needed a bit of checks...

Signed-off-by: emanuele <[email protected]>
emanuele vor 12 Jahren
Ursprung
Commit
aacdd8c4c5
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. 2 2
      Sources/Subs.php

+ 2 - 2
Sources/Subs.php

@@ -4097,7 +4097,7 @@ function add_integration_function($hook, $function, $file, $permanent = true)
 {
 	global $smcFunc, $modSettings;
 
-	$integration_call = $function . ':' . $file;
+	$integration_call = (!empty($file) && $file !== true) ? $function . ':' . $file : $function;
 
 	// Is it going to be permanent?
 	if ($permanent)
@@ -4151,7 +4151,7 @@ function remove_integration_function($hook, $function, $file)
 {
 	global $smcFunc, $modSettings;
 
-	$integration_call = $function . ':' . $file;
+	$integration_call = (!empty($file)) ? $function . ':' . $file : $function;
 
 	// Get the permanent functions.
 	$request = $smcFunc['db_query']('', '