I’d guess that $data
is being treated as an integer, and therefore your stristr
is returning false.
Try explicitly casting $data
as a string:
if ( stristr( strval( $data ), $partial_match ) ) {
return $mapped_value;
}
I’d guess that $data
is being treated as an integer, and therefore your stristr
is returning false.
Try explicitly casting $data
as a string:
if ( stristr( strval( $data ), $partial_match ) ) {
return $mapped_value;
}