- Posts: 6
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Notice: Undefined property: stdClass::$author ... Trying to get property of non-object
Notice: Undefined property: stdClass::$author ... Trying to get property of non-object
- Paul Bauder
-
Topic Author
- Offline
- New Member
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Platinum Member
- Posts: 8743
Please Log in or Create an account to join the conversation.
- Paul Bauder
-
Topic Author
- Offline
- New Member
- Posts: 6
Thanks in advance.
Lefteris Kavadas said:Hi. This is just a notice. You can set error reporting to "None" or "Simple" through Joomla! configuration to get rid of it. Of course it has been fixed for the next release. Thanks for reporting.
Please Log in or Create an account to join the conversation.
- william white
-
- Offline
- Platinum Member
- Posts: 3722
Please Log in or Create an account to join the conversation.
- Paul Bauder
-
Topic Author
- Offline
- New Member
- Posts: 6
William White said:check the server tab
Please Log in or Create an account to join the conversation.
- Petitsuisse
-
- Offline
- New Member
- Posts: 3
Do you have any idea of when this new release will be available? or is there a patch available?
thanks,
Please Log in or Create an account to join the conversation.
- Marek Wojtaszek
-
- Offline
- Junior Member
- Posts: 27
Please Log in or Create an account to join the conversation.
- Marek Wojtaszek
-
- Offline
- Junior Member
- Posts: 27
Please Log in or Create an account to join the conversation.
- Valentine
-
- Offline
- New Member
- Posts: 10
Please Log in or Create an account to join the conversation.
- Nerijus Jovaras
-
- Offline
- New Member
- Posts: 3
but my changes didn't remove the error.
Please Log in or Create an account to join the conversation.
- Jennifer Spencer
-
- Offline
- New Member
- Posts: 1
1. Create a K2 article with author set to hidden (and php's error reporting is set to notice).
2. View the article in item layout
3. In some cases I got a notice message.
What is the expected output? What do you see instead?
I got 2 notice massages:
Notice: Undefined property: stdClass::$author in (...)\components\com_k2\views\item\view.html.php on line 58
Notice: Trying to get property of non-object in (...)\components\com_k2\views\item\view.html.php on line 58
What version of the product are you using? On what operating system?
2.3
Please provide any additional information below.
The line should be changed as follows for safer execution:
if (isset($item->author) && is_object($item->author->profile) && $item->author->profile->id > 0) {
(or load the author profile in any case in the model's prepare Item method)
Found on (code.google.com/p/joomlaworks/updates/list)
Please Log in or Create an account to join the conversation.
- ruigato
-
- Offline
- New Member
- Posts: 18
Jennifer Spencer said:What steps will reproduce the problem? 1. Create a K2 article with author set to hidden (and php's error reporting is set to notice).
2. View the article in item layout
3. In some cases I got a notice message.
What is the expected output? What do you see instead?
I got 2 notice massages:
Notice: Undefined property: stdClass::$author in (...)\components\com_k2\views\item\view.html.php on line 58
Notice: Trying to get property of non-object in (...)\components\com_k2\views\item\view.html.php on line 58
What version of the product are you using? On what operating system?
2.3
Please provide any additional information below.
The line should be changed as follows for safer execution:
if (isset($item->author) && is_object($item->author->profile) && $item->author->profile->id > 0) {
(or load the author profile in any case in the model's prepare Item method)
Found on (code.google.com/p/joomlaworks/updates/list)
Please Log in or Create an account to join the conversation.
- thejamkit
-
- Offline
- New Member
- Posts: 6
A patch or hack to this php file would really help though before the next release... any takers?
Please Log in or Create an account to join the conversation.
- Ruud
-
- Offline
- Junior Member
- Posts: 25
Please Log in or Create an account to join the conversation.
- stavroch
-
- Offline
- Elite Member
- Posts: 295
Please Log in or Create an account to join the conversation.
- Birg
-
- Offline
- New Member
- Posts: 1
Please Log in or Create an account to join the conversation.
- dvlancer
-
- Offline
- New Member
Please Log in or Create an account to join the conversation.
- Forum
- K2 Community Forum
- English K2 Community
- Notice: Undefined property: stdClass::$author ... Trying to get property of non-object