diff --git a/core/ajax/eqLogic.ajax.php b/core/ajax/eqLogic.ajax.php index b9479ebc2e..54a940b68e 100644 --- a/core/ajax/eqLogic.ajax.php +++ b/core/ajax/eqLogic.ajax.php @@ -541,7 +541,7 @@ $eqLogicsSave = json_decode($eqLogicSaves, true); $nbrSave = count($eqLogicsSave); $return = array(); - + $eqLogic = null; foreach ($eqLogicsSave as $eqLogicSave) { if (!is_array($eqLogicSave)) { diff --git a/core/ajax/scenario.ajax.php b/core/ajax/scenario.ajax.php index 71c50a501f..01ce03078c 100644 --- a/core/ajax/scenario.ajax.php +++ b/core/ajax/scenario.ajax.php @@ -183,6 +183,7 @@ if (init('action') == 'applyTemplate') { unautorizedInDemo(); $path = __DIR__ . '/../../data/scenario'; + $converts = []; if (!file_exists($path . '/' . init('template'))) { throw new Exception(__('Fichier non trouvé :', __FILE__) . ' ' . $path . '/' . init('template')); } diff --git a/core/ajax/user.ajax.php b/core/ajax/user.ajax.php index d2322e2013..3a925922ab 100644 --- a/core/ajax/user.ajax.php +++ b/core/ajax/user.ajax.php @@ -37,6 +37,7 @@ if (!isConnect()) { if (config::byKey('sso:allowRemoteUser') == 1) { + $configs = config::byKeys(array('session_lifetime', 'sso:allowRemoteUser', 'sso:remoteUserHeader')); $header = $configs['sso:remoteUserHeader']; $header_value = $_SERVER[$header]; $user = user::byLogin($header_value); diff --git a/core/api/jeeApi.php b/core/api/jeeApi.php index 87c2a76b37..df20f674c8 100644 --- a/core/api/jeeApi.php +++ b/core/api/jeeApi.php @@ -497,6 +497,7 @@ throw new Exception(__('Vous n\'avez pas les droits de faire cette action', __FILE__), -32701); } unautorizedInDemo(); + $object = null; if (isset($params['id'])) { $object = jeeObject::byId($params['id']); } @@ -836,6 +837,7 @@ if ($jsonrpc->getMethod() == 'cmd::save') { unautorizedInDemo(); + $cmd = null; if (isset($params['id'])) { $cmd = cmd::byId($params['id']); if (is_object($_USER_GLOBAL) && !$cmd->hasRight($_USER_GLOBAL)) { @@ -979,6 +981,7 @@ if ($jsonrpc->getMethod() == 'scenario::save') { unautorizedInDemo(); + $scenario = null; if (isset($params['id'])) { $scenario = scenario::byId($params['id']); } @@ -1151,6 +1154,7 @@ throw new Exception(__('Vous n\'avez pas les droits de faire cette action', __FILE__), -32701); } unautorizedInDemo(); + $update = null; if (isset($params['plugin_id'])) { $update = update::byId($params['plugin_id']); } @@ -1293,6 +1297,7 @@ throw new Exception(__('Vous n\'avez pas les droits de faire cette action', __FILE__), -32701); } unautorizedInDemo(); + $update = null; if (isset($params['plugin_id'])) { $update = update::byId($params['plugin_id']); } diff --git a/core/class/history.class.php b/core/class/history.class.php index 3b4c0d4203..11e5956c2c 100644 --- a/core/class/history.class.php +++ b/core/class/history.class.php @@ -362,6 +362,7 @@ public static function all($_cmd_id, $_startTime = null, $_endTime = null, $_gro $values['endTime'] = $_endTime; } $sql=''; + $goupingType = []; if ($_groupingType == null || strpos($_groupingType, '::') === false) { $sql .= 'SELECT ' . DB::buildField(__CLASS__); } else { diff --git a/core/class/interactQuery.class.php b/core/class/interactQuery.class.php index be5117a895..5ccf9c14a9 100644 --- a/core/class/interactQuery.class.php +++ b/core/class/interactQuery.class.php @@ -116,6 +116,7 @@ public static function removeByInteractDefId($_interactDef_id) { } public static function recognize($_query) { + $closest = null; $_query = trim(interactDef::sanitizeQuery($_query)); if (trim($_query) == '') { return null; @@ -248,6 +249,7 @@ public static function findInQuery($_type, $_query, $_data = null) { $return['query'] = strtolower(sanitizeAccent($_query)); $return[$_type] = null; $synonyms = self::getQuerySynonym($return['query'], $_type); + $objects = []; if ($_type == 'object') { $objects = jeeObject::all(); } elseif ($_type == 'eqLogic') { @@ -332,6 +334,7 @@ public static function autoInteract($_query, $_parameters = array()) { $data = array_merge($data, self::findInQuery('eqLogic', $data['query'], $data)); $data = array_merge($data, self::findInQuery('cmd', $data['query'], $data)); if (isset($data['eqLogic']) && is_object($data['eqLogic']) && (!isset($data['cmd']) || !is_object($data['cmd']))) { + $cmd = null; foreach ($data['eqLogic']->getCmd('action') as $cmd) { if ($cmd->getSubtype() == 'slider') { break; diff --git a/core/class/jeeObject.class.php b/core/class/jeeObject.class.php index 39f6884f0a..dcc6415053 100644 --- a/core/class/jeeObject.class.php +++ b/core/class/jeeObject.class.php @@ -296,6 +296,7 @@ public static function checkSummaryUpdate($_cmd_id) { } $toRefreshCmd = array(); $global = array(); + $events = []; foreach ($objects as $object) { $summaries = $object->getConfiguration('summary'); if (!is_array($summaries)) { diff --git a/core/class/update.class.php b/core/class/update.class.php index c2b5062355..e6f8700a34 100644 --- a/core/class/update.class.php +++ b/core/class/update.class.php @@ -493,6 +493,7 @@ public function postInstallUpdate($_infos) { } public static function getLastAvailableVersion() { + $url = 'undefined url'; try { $url = 'https://raw.githubusercontent.com/jeedom/core/' . config::byKey('core::branch', 'core', 'master') . '/core/config/version'; $request_http = new com_http($url); diff --git a/core/class/utils.class.php b/core/class/utils.class.php index 57489aac2a..83310b90c5 100644 --- a/core/class/utils.class.php +++ b/core/class/utils.class.php @@ -178,6 +178,7 @@ public static function getJsonAttr(&$_attr, $_key = '', $_default = '') { } if (empty($_attr)) { if (is_array($_key)) { + $return = []; foreach ($_key as $key) { $return[$key] = $_default; } diff --git a/core/class/widgets.class.php b/core/class/widgets.class.php index 1cb729e000..7fea8ae343 100644 --- a/core/class/widgets.class.php +++ b/core/class/widgets.class.php @@ -31,6 +31,7 @@ class widgets { private $test; private $display; private $_changed = false; + protected $_needRefreshWidget = false; /* * ***********************Méthodes statiques*************************** */ diff --git a/core/php/utils.inc.php b/core/php/utils.inc.php index 08b0613c92..625da972b3 100644 --- a/core/php/utils.inc.php +++ b/core/php/utils.inc.php @@ -1692,6 +1692,7 @@ function getTZoffsetMin() { } function pageTitle($_page) { + $return = $_page; switch ($_page) { case 'overview': $return = __('Synthèse', __FILE__); @@ -1786,9 +1787,6 @@ function pageTitle($_page) { $return = __('Panel', __FILE__); break; } - default: - $return = $_page; - break; } return ucfirst($return); } diff --git a/desktop/modal/planHeader.configure.php b/desktop/modal/planHeader.configure.php index 5eed1511d3..d9fe525029 100644 --- a/desktop/modal/planHeader.configure.php +++ b/desktop/modal/planHeader.configure.php @@ -138,6 +138,7 @@ $tr .= $plan->getLink_id(); $tr .= ''; $tr .= '