PHP 8 updates

add IF condition to avoid 'Deprecated' warning
This commit is contained in:
buckaroo-labs 2023-12-20 17:46:35 -08:00 committed by GitHub
parent cdb370dd1c
commit 8e197cd42a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -137,7 +137,8 @@ class SemanticScuttle_Service_Tag extends SemanticScuttle_DbService
/* normalize the input tags which could be a string or an array*/
function normalize($tags) {
//clean tags from strange characters
$tags = str_replace(array('"', '\'', '/'), "_", $tags);
//2023-12-20 add IF condition to avoid 'Deprecated' warning
if (!is_null($tags)) $tags = str_replace(array('"', '\'', '/'), "_", $tags);
//normalize
if(!is_array($tags)) {