Skip to content

Commit

Permalink
Fixing bug related to not specifying element when splitting search st…
Browse files Browse the repository at this point in the history
…ring
  • Loading branch information
jegelstaff committed Sep 23, 2024
1 parent 4eb4b82 commit e387886
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/formulize/include/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7205,12 +7205,15 @@ function standardizeUserTypedSearchTerms($searchString, $elementIdentifier) {
* Take a search string and turn it into an array of constituent search terms by splitting on // and OR and AND
*
* @param string $searchString The string we are parsing
* @param mixed $elementIdentifier An element object, id number, or handle. Represents the element that this search string is searching against.
* @return array An array of the constituent search terms found in the string, even if only one
*/
function splitUpSearchStringIntoSearchTerms($searchString, $elementIdentifier) {

$elementObject = _getElementObject($elementIdentifier);
$ele_uitext = $elementObject->getVar('ele_uitext');
$ele_uitext = array();
if($elementObject = _getElementObject($elementIdentifier)) {
$ele_uitext = $elementObject->getVar('ele_uitext');
}

if($searchString === "") { return array(); }
$searchArray = array();
Expand Down

0 comments on commit e387886

Please sign in to comment.