Skip to content

Commit 0aba9c8

Browse files
QuyTonQuylaoneo
authored
[4.4] Fix strpos(): Passing null is deprecated (#42773)
* Fix deprecated warning * Better code. Co-authored-by: Allon Moritz <[email protected]> --------- Co-authored-by: Quy <[email protected]> Co-authored-by: Allon Moritz <[email protected]>
1 parent bef1c83 commit 0aba9c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/content/fields/src/Extension/Fields.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function onContentPrepare($context, &$item, &$params, $page = 0)
6868
}
6969

7070
// Prepare the full text
71-
if (property_exists($item, 'fulltext') && strpos($item->fulltext, 'field') !== false) {
71+
if (!empty($item->fulltext) && strpos($item->fulltext, 'field') !== false) {
7272
$item->fulltext = $this->prepare($item->fulltext, $context, $item);
7373
}
7474
}

0 commit comments

Comments
 (0)