From 2e148944cda0dcc33deb35857cada4a2e6b9d7c6 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 24 Mar 2016 08:40:43 +0000 Subject: [PATCH] PHP7 fix, unsetting function arguments (for quitening IDE warning of not using them) before calling func_get_args() return no longer any arguments, need to be done after --- phpgwapi/inc/class.egw_framework.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.egw_framework.inc.php b/phpgwapi/inc/class.egw_framework.inc.php index dcd65bac5e..2574700316 100644 --- a/phpgwapi/inc/class.egw_framework.inc.php +++ b/phpgwapi/inc/class.egw_framework.inc.php @@ -315,9 +315,10 @@ abstract class egw_framework */ public static function refresh_opener($msg, $app, $id=null, $type=null, $targetapp=null, $replace=null, $with=null, $msg_type=null) { - unset($msg, $app, $id, $type, $targetapp, $replace, $with, $msg_type); // used only via func_get_args(); //error_log(__METHOD__.'('.array2string(func_get_args()).')'); self::$extra['refresh-opener'] = func_get_args(); + + unset($msg, $app, $id, $type, $targetapp, $replace, $with, $msg_type); // used only via func_get_args(); } /** @@ -330,8 +331,9 @@ abstract class egw_framework */ public static function message($msg, $type='success') { - unset($msg, $type); // used only via func_get_args(); self::$extra['message'] = func_get_args(); + + unset($msg, $type); // used only via func_get_args(); } /** @@ -343,10 +345,11 @@ abstract class egw_framework */ public static function popup($link, $target='_blank', $popup='640x480') { - unset($link, $target, $popup); // used only via func_get_args() // default params are not returned by func_get_args! $args = func_get_args()+array(null, '_blank', '640x480'); + unset($link, $target, $popup); // used only via func_get_args() + if (egw_json_request::isJSONRequest()) { egw_json_response::get()->apply('egw.open_link', $args);