Thread Starter
Aris
(@bugsysop)
The function that generete the error (setting.php file from the plugin)
function admin_search_setting_post_types() {
echo "<div id='admin_search_plugin_setting_post_types'>";
foreach ( get_post_types( array(), 'object' ) as $post_type ) {
if ( $post_type -> {'public'} ) {
echo "<p><label><input type='checkbox' name='admin_search_settings[post_types][]' value='{$post_type -> name}'";
if ( in_array( $post_type -> name, admin_search_setting( 'post_types' ) ) ) {
echo " checked";
}
echo "> {$post_type -> label}</label></p>";
}
}
echo "</div>";
}
This may have something to do with this…
The error message is pretty clear: the in_array() function expects the second parameter to be an array. Instead, it’s receiving a string from that code snippet. If you’re the developer of this plugin you need to add some extra validations to prevent this issue from happening.
From Stackoverflow
Hi Aris,
Apologies for not responding sooner. Version 1.2.2 should resolve this issue.
Andrew