Pro 6.0 beta 3 error: Empty needle in Condition Rule

Upgraded a site from 5.x to the latest beta and this error showed up:

The Condition in question was set as a String comparison, and in the 5.x site, it was set to {{dc:looper:field key="image"}} is blank, i.e. checking if the field has any content or has been set.

Upgrading to Pro 6.0 b3 has changed this to a in comparison

I like that we have additional comparison / condition options, but it should keep any previously set condition settings. In this case, this may be a default setting issue, where I didn’t explicitly set the comparison to is or is not, and just left it untouched on adding it. Perhaps this has meant that it defaulted to the new first option of in?

1 Like

Actually, ignore this!

The error is occurring in the 5.x site too, I must have cycled through is, is not, in, and not in without realising, and left it on in by accident.

Unless there is some check that could be put in place to make sure an empty string needle doesn’t return an error?

1 Like

Thanks for the info here, @arthurodb. A warning like that in PHP is different than a fatal error. Just like in JavaScript land, warnings can pass and often do in many websites without causing a runtime issue. It’s more of an alert saying, “Hey, this might be something you want to cleanup.” It shouldn’t be something you even see unless debugging is on. That all being said, I will note this down to see if we can clean it up because of course we want to be good custodians. :slight_smile:

3 Likes