Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into

develop
This commit is contained in:
Laurent Destailleur
2025-10-19 23:13:26 +02:00
parent ad00c73028
commit 2076c44618
5 changed files with 14 additions and 13 deletions

View File

@@ -4342,7 +4342,7 @@ function getArrayOfSocialNetworks()
$socialnetworks = $dataretrieved;
} else {
$sql = "SELECT rowid, code, label, url, icon, active FROM " . MAIN_DB_PREFIX . "c_socialnetworks";
$sql .= " WHERE entity=" . $conf->entity;
$sql .= " WHERE entity =" . ((int) $conf->entity);
$resql = $db->query($sql);
if ($resql) {
while ($obj = $db->fetch_object($resql)) {
@@ -4357,7 +4357,8 @@ function getArrayOfSocialNetworks()
}
dol_setcache($cachekey, $socialnetworks); // If setting cache fails, this is not a problem, so we do not test result.
}
return $socialnetworks;
return (is_array($socialnetworks) ? $socialnetworks : array());
}
/**