is there any fix available for this?
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)