forked from splittingred/SimpleSearch
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Error log:
PHP Fatal error: Uncaught TypeError: SimpleSearch\SimpleSearch::createExtract(): Argument #1 ($text) must be of type string, null given, called in ../public_html/core/cache/includes/elements/modx/revolution/modsnippet/41.include.cache.php on line 88 and defined in ../core/components/simplesearch/src/SimpleSearch.php:340
Possible no NULL check in createExtact.
public function createExtract($text, $length = 200,$search = '',$ellipsis = '...') -
I could 'fix' this by adding if(!isset($text)) { $text = ''; } before the call in the SimpleSearch snippet.
// @@ fix Uncaught TypeError: SimpleSearch\\SimpleSearch::createExtract(): Argument #1 ($text) must be of type string, null given,
if(!isset($text)) { $text = ''; }
$extract = $search->createExtract($text, $extractLength, $extract,$extractEllipsis);
Metadata
Metadata
Assignees
Labels
No labels