WPIntell

Source evidence

Non object Error

Authors Widget · support · 2016-09-10T15:52:00+00:00

complaintsentiment
mediumseverity
0.92relevance
6replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

2 / 25 rows with source links

8.0% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

23 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
Minh Tuan Nguyen unresolved
Hi, After add the widget. it show like that: Notice: Trying to get property of non-object in /plugins/authors/authors.php on line 538 Any help? It looks like you’re trying to exclude an non-existant user ID. Try to remove it from the “exclude” field I also have this problem and an undefined constant: Notice: Trying to get property of non-object in plugins/authors/authors.php on line 538 Notice: Use of undefined constant widget_authors_sort_by_random - assumed 'widget_authors_sort_by_random' in plugins/authors/authors.php on line 69 The “exclude” field is empty in the settings, but when I output the value of exclude at line 533 it was “0”. WP v4.7.2 Plugin v2.4.4 Try version 2.4.5, it should fix this problem Thank you, that seems to have stopped that error but we still see this: Notice: Use of undefined constant widget_authors_sort_by_random - assumed 'widget_authors_sort_by_random' in plugins/authors/authors.php on line 69 This reply was modified 9 years, 3 months ago by Jamie Burchell . This reply was modified 9 years, 3 months ago by Jamie Burchell . Any update on this? Thanks 🙂 I think you need to quote the function names as a string like this: function widget_authors_sort_by($orderby, &$authors) { # if ('first_name' != $orderby && 'last_name' != $orderby) { # return; # } switch ($orderby) { case 'first_name': array_walk($authors, 'widget_authors_add_last_name'); usort($authors, 'widget_authors_sort_by_first_name'); break; case 'last_name': array_walk($authors, 'widget_authors_add_last_name'); usort($authors, 'widget_authors_sort_by_last_name'); break; case 'id': usort($authors, 'widget_authors_sort_by_id'); break; case 'random': usort($authors, 'widget_authors_sort_by_random'); break; # case 'posts': # usort($authors, 'widget_authors_sort_by_posts'); # break; } } This reply was modified 9 years, 3 months ago by Jamie Burchell .

Comments

6 shown
flocsy 2016-09-11T20:17:00+00:00

It looks like you’re trying to exclude an non-existant user ID. Try to remove it from the “exclude” field

Jamie Burchell 2017-02-02T15:00:00+00:00

I also have this problem and an undefined constant: Notice: Trying to get property of non-object in plugins/authors/authors.php on line 538 Notice: Use of undefined constant widget_authors_sort_by_random - assumed 'widget_authors_sort_by_random' in plugins/authors/authors.php on line 69 The “exclude” field is empty in the settings, but when I output the value of exclude at line 533 it was “0”. WP v4.7.2 Plugin v2.4.4

flocsy 2017-02-06T08:24:00+00:00

Try version 2.4.5, it should fix this problem

Jamie Burchell 2017-02-06T11:51:00+00:00

Thank you, that seems to have stopped that error but we still see this: Notice: Use of undefined constant widget_authors_sort_by_random - assumed 'widget_authors_sort_by_random' in plugins/authors/authors.php on line 69 This reply was modified 9 years, 3 months ago by Jamie Burchell . This reply was modified 9 years, 3 months ago by Jamie Burchell .

Jamie Burchell 2017-02-22T16:46:00+00:00

Any update on this? Thanks 🙂

Jamie Burchell 2017-02-28T18:39:00+00:00

I think you need to quote the function names as a string like this: function widget_authors_sort_by($orderby, &$authors) { # if ('first_name' != $orderby && 'last_name' != $orderby) { # return; # } switch ($orderby) { case 'first_name': array_walk($authors, 'widget_authors_add_last_name'); usort($authors, 'widget_authors_sort_by_first_name'); break; case 'last_name': array_walk($authors, 'widget_authors_add_last_name'); usort($authors, 'widget_authors_sort_by_last_name'); break; case 'id': usort($authors, 'widget_authors_sort_by_id'); break; case 'random': usort($authors, 'widget_authors_sort_by_random'); break; # case 'posts': # usort($authors, 'widget_authors_sort_by_posts'); # break; } } This reply was modified 9 years, 3 months ago by Jamie Burchell .