diff options
author | buckaroo-labs | 2023-12-20 17:46:35 -0800 |
---|---|---|
committer | GitHub | 2023-12-20 17:46:35 -0800 |
commit | 8e197cd42a953fd69d84b3fb59b8219b1584a0a3 (patch) | |
tree | 81d6a610a24e31cf56fc046f04646e5d3cf60c69 /src/SemanticScuttle | |
parent | cdb370dd1c2066b6989140379b9c0302f883d968 (diff) | |
download | scuttle-8e197cd42a953fd69d84b3fb59b8219b1584a0a3.tar.gz scuttle-8e197cd42a953fd69d84b3fb59b8219b1584a0a3.zip |
PHP 8 updates
add IF condition to avoid 'Deprecated' warning
Diffstat (limited to 'src/SemanticScuttle')
-rw-r--r-- | src/SemanticScuttle/Service/Tag.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/SemanticScuttle/Service/Tag.php b/src/SemanticScuttle/Service/Tag.php index bd6bf70..17acae7 100644 --- a/src/SemanticScuttle/Service/Tag.php +++ b/src/SemanticScuttle/Service/Tag.php @@ -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)) { |