[BUG] v0.8.9.1: format_value of acfe_field_code_editor causes PHP fatal error
-
From ACFE 0.8.9.1 the
acfe_code_editor
field savesreturn_format
(when none of HTML Entities nor New Lines to <br> checked) as empty string, which causes PHP fatal error in methodacfe_field_code_editor->format_value
wherein_array('htmlentities', $field['return_format'])
receives the string as second parameter./** * format_value * * @param $value * @param $post_id * @param $field * * @return string */ function format_value($value, $post_id, $field){ if(in_array('htmlentities', $field['return_format'])){ $value = htmlentities($value); } if(in_array('nl2br', $field['return_format'])){ $value = nl2br($value); } return $value; }
Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in www\wp-content\plugins\acf-extended\includes\fields\field-code-editor.php on line 218.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘[BUG] v0.8.9.1: format_value of acfe_field_code_editor causes PHP fatal error’ is closed to new replies.