Use a more explicit !empty for checking string contents

This commit is contained in:
Joshua Ramon Enslin 2022-01-08 14:15:51 +01:00
parent 52a90d669c
commit 109f18e63c
Signed by: jrenslin
GPG Key ID: 46016F84501B70AE

View File

@ -1081,7 +1081,7 @@ final class NodaWikidataFetcher {
$datafromwiki = MD_STD::runCurl("https://" . urlencode($lang) . ".wikipedia.org/w/api.php?action=parse&page=" . urlencode($wikilinkterm[$lang]) . "&prop=text&section=0&format=json", 10000);
$datafromwiki = json_decode($datafromwiki, true)['parse']['text']['*'];
if (!empty($datafromwiki) and $datafromwiki = self::_cleanWikidataInput((string)$datafromwiki)) {
if (!empty($datafromwiki) and !empty($datafromwiki = self::_cleanWikidataInput((string)$datafromwiki))) {
$alreadyEntered = $this->enterPlaceDescFromWikidata($currentPlaceResult, $datafromwiki, $wikilink, $lang, $lang, $onum, $erfasst_von);
}
}