Jump to content

Error Message on special CustomField Query


PeterD
Go to solution Solved by Alejandro,

Recommended Posts

I have some old listings in a category (listing type) to which I have assigned new fields.

Everything works so far, but when I work with the following query I get an error on all listings where the field is not filled in

<?php if (in_array('option-value', $CustomFields->fieldValue('jr_fieldname',$listing))): ?>

  <!-- Conditional output -->

<?php endif; ?>

Error:
 

0 in_array(): Argument #2 ($haystack) must be of type array, bool given

 

Link to comment
×
×
  • Create New...