Content Boxes bug after ugrade
-
Hi
After upgrading to v3.9.4 I found a problem when using a child theme (empty to start with) and content boxes.
The problem raises the following warning
Warning: count(): Parameter must be an array or an object that implements Countable in C:\xampp\htdocs\clean\wp-content\themes\evolve\functions.php on line 244
Even if you are not enabling Content Boxes the Icon options are still in the database
(evl_content_box1_icon, evl_content_box2_icon, evl_content_box3_icon and evl_content_box4_icon). The options for these fields are tested as if they were arrays when in fact they are strings.I think the following fixing should be placed in functions.php (line 244)
if ( is_string( $name ) && evolve_suffix( $name, '_icon' ) ) { if ( $result ) { if ( ( strpos( $result, 'fa-' ) === 0 ) ) { // It starts with 'fa-' $result = 'fas ' . $result; set_theme_mod( $name, $result ); } if ( <blockquote>// WRONG count( $result ) != 0 strlen ( $result ) != 0</blockquote> && ! ( strpos( $result, 'fas ' ) === 0 ) && ! ( strpos( $result, 'fab ' ) === 0 ) && ! ( strpos( $result, 'far ' ) === 0 ) ) { $result = evolve_font_awesome_4_to_5( $result ); set_theme_mod( $name, $result ); } } else { return 'fas fa-'; } }Kind regards
Zulok
The topic ‘Content Boxes bug after ugrade’ is closed to new replies.
