warnings are not errors. are you posts not being ordered on the front-end?
The plugin seems to be functioning ok, but there are hundreds of log entries like this, just over the past month. I am reporting this because I would assume that you would want to write clean code. It seems to be tied to this section of code:
if (isset($queriedObj->taxonomy) && isset($queriedObj->term_id)) {
/** @since 2.9.1 fix multi-term queries bug */
$validate = true;
switch(true){
case $wp_query->is_category and ($wp_query->is_tag || $wp_query->is_tax):
case $wp_query->is_tag and ($wp_query->is_category || $wp_query->is_tax):
case $wp_query->is_tax and ($wp_query->is_category || $wp_query->is_tag):
$validate = false; //multiple taxonomy queried.
break;
case isset($wp_query->tax_query):
foreach($wp_query->tax_query->queries as $t){
if(is_array($t['terms']) && count($t['terms'])>1) $validate = false; //multiple terms queried.
}
break;
}
if(!$validate) return 0;
$term_id = $queriedObj->term_id;
$taxonomy = $queriedObj->taxonomy;
// debug_msg($wp_query->tax_query->queries, "$taxonomy is ranked $term_id ");
} else {
return 0;
}
-
This reply was modified 5 years, 2 months ago by
Abigailm.
I would assume that you would want to write clean code.
thanks @abigailm I have already placed a validation in the code. Since it is not critical it will get released in the next version.
hundreds of log entries like this,
from this plugin?
If you look at the log entry I posted, it specifically references this plugin as the source of the error:
PHP Warning: Illegal string offset ‘terms’ in //wp-content/plugins/reorder-post-within-categories/public/class-reorder-post-within-categories-public.php on line 130
If it helps, this error first showed up in the logs about a month ago.
-
This reply was modified 5 years, 2 months ago by
Abigailm.
-
This reply was modified 5 years, 2 months ago by
Abigailm.
Indeed, and if you read my answer…
I have already placed a validation in the code. Since it is not critical it will get released in the next version.
You can see this has been corrected
Me too, thanks for fix. Log growing fast.