Warning for parameter in preg_match
-
I get this warning, when using Recencio together with a plugin called Link Library. However, preg_match() seems to be a PHP function.
Warning: preg_match() expects parameter 2 to be string, array given in /var/www/wp/htdocs/wp-content/plugins/recencio-book-reviews/admin/class-rcno-reviews-admin.php on line 825
I tried to limit the input to the first element of the array:
public function rcno_sort_admin_columns_by_taxonomy( $clauses, $wp_query ) {global $wpdb;
if ( isset( $wp_query->query[‘orderby’] ) && preg_match( ‘/taxonomy-rcno_/’, $wp_query->query[‘orderby’][0] ) ) {
$taxonomy = str_replace( ‘taxonomy-‘, ”, $wp_query->query[‘orderby’] );which removed the warning. No idea, what damage this does elsewhere.
regards
harald brandstetter
- The topic ‘Warning for parameter in preg_match’ is closed to new replies.