Open bvisness opened 7 years ago
For some versions of SearchWP, the posts field of SWP_Query can come back null, causing warnings when used in a foreach loop. This adds a check for null that ensures an empty array is always used.
posts
SWP_Query
null
foreach
Just encountered this problem myself, thanks for posting! Hope it's merged into the main repo eventually.
For some versions of SearchWP, the
posts
field ofSWP_Query
can come backnull
, causing warnings when used in aforeach
loop. This adds a check for null that ensures an empty array is always used.