Missing type check in ACF compatibility
-
The function
relevanssi_index_acf()inlib/compatibility/acf.phpis missing a type check for the variable$valuedefined on line 68. With normal ACF choice fields, this doesn’t represent a problem, but ACF fields that are added via plugin could break this. I ran into this problem when using acf-svg-icon, which returns an Array instead of a String as$value.The condition in line 69 should add a type check for Strings (
if ( is_string( $value ) )to fix this problem. Otherwise a PHP error will be thrown when saving a post with custom ACF fields and the post cannot be saved.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Missing type check in ACF compatibility’ is closed to new replies.