fix php warnings with PHP8

Dieser Commit ist enthalten in:
Ortwin Pinke 2022-10-26 18:49:45 +02:00
Ursprung 10725d7234
Commit 823796a768
3 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -251,7 +251,7 @@ $errsite = 'Location: ' . Contenido_Url::getInstance()->buildRedirect($aParams);
* Note: These variables can be set via http globals e.g. front_content.php?idcat=41&idart=34&idcatart=35&idartlang=42 * Note: These variables can be set via http globals e.g. front_content.php?idcat=41&idart=34&idcatart=35&idartlang=42
* If not the values will be computed. * If not the values will be computed.
*/ */
if ($idart && !$idcat && !$idcatart) { if (!empty($idart) && empty($idcat) && empty($idcatart)) {
/* Try to fetch the first idcat */ /* Try to fetch the first idcat */
$sql = "SELECT idcat FROM " . $cfg["tab"]["cat_art"] . " WHERE idart = '" . Contenido_Security::toInteger($idart) . "'"; $sql = "SELECT idcat FROM " . $cfg["tab"]["cat_art"] . " WHERE idart = '" . Contenido_Security::toInteger($idart) . "'";
$db->query($sql); $db->query($sql);
@ -420,7 +420,7 @@ if ($cfg["cache"]["disable"] != '1') {
* The reason is to avoid cross-site scripting errors in the backend, if the backend domain differs from * The reason is to avoid cross-site scripting errors in the backend, if the backend domain differs from
* the frontend domain. * the frontend domain.
*/ */
if ($contenido) { if (isset($contenido)) {
$perm->load_permissions(); $perm->load_permissions();
/* Change mode edit / view */ /* Change mode edit / view */
@ -536,7 +536,7 @@ if (empty($inUse) && (isset($allow) && $allow == true) && $view == "edit" && ($p
############################################## ##############################################
/* Mark submenuitem 'Preview' in the Contenido Backend (Area: Contenido --> Articles --> Preview) */ /* Mark submenuitem 'Preview' in the Contenido Backend (Area: Contenido --> Articles --> Preview) */
if ($contenido) { if (isset($contenido)) {
$markscript = markSubMenuItem(4, true); $markscript = markSubMenuItem(4, true);
} }

Datei anzeigen

@ -145,7 +145,7 @@ class cApiModule extends Item {
} }
} }
$oClient = new cApiClient($client); $oClient = new cApiClient(cRegistry::getClientId());
$aClientProp = $oClient->getPropertiesByType('modfileedit'); $aClientProp = $oClient->getPropertiesByType('modfileedit');
if (count($aClientProp) > 0) { if (count($aClientProp) > 0) {
$this->_aModFileEditConf = array_merge($this->_aModFileEditConf, $aClientProp); $this->_aModFileEditConf = array_merge($this->_aModFileEditConf, $aClientProp);

Datei anzeigen

@ -80,7 +80,7 @@ $ipc_conpluginpath = cRegistry::getPluginsPath();
* *
* @deprecated since version 2.0 * @deprecated since version 2.0
*/ */
if ($contenido) { if (isset($contenido)) {
$lastscantime = getSystemProperty("system", "plugin-lastscantime"); $lastscantime = getSystemProperty("system", "plugin-lastscantime");
/* Clean up: Fetch and trim the plugin order */ /* Clean up: Fetch and trim the plugin order */