Closed pictus closed 1 year ago
We created some entities, after that, it was not possible to search for those entries.
The error was something like preg_match requires the second argument to be a string, array given in lib/MongoLite/UtilArrayQuery.php:195.
preg_match requires the second argument to be a string, array given in lib/MongoLite/UtilArrayQuery.php:195
I dont have the time, to make a PR, or a deeper research, only wanted to give my solution, how i fixed this problem, sorry for that.
Solution:
case '$not': # add this line, than the search works correct. if(is_array($a)) { break; } $r = (boolean) @\preg_match(isset($b[0]) && $b[0]=='/' ? $b : '/'.$b.'/iu', $a, $match); if ($func === '$not') { $r = !$r; } break;
Thanks for reporting. Should be fixed with this commit: https://github.com/Cockpit-HQ/Cockpit/commit/54d7d5d2bba898b63a8677ef2daa7eec5ced5102
We created some entities, after that, it was not possible to search for those entries.
The error was something like
preg_match requires the second argument to be a string, array given in lib/MongoLite/UtilArrayQuery.php:195
.I dont have the time, to make a PR, or a deeper research, only wanted to give my solution, how i fixed this problem, sorry for that.
Solution: