com_search does generate an error undefined property GitHub issue(#21832)

Did you find a bug in Joomla! 3.x but aren't sure? This forum is the place to help figure out if the problem is a bug and how to report it. If you are an experienced Joomla! user and are certain that you have found a bug please use the Bug Tracker to submit your issue.
This forum is for discussion about bugs and to get help with reporting them to the Bug Tracker: https://issues.joomla.org

Moderator: ooffick

Forum rules
Please use the official Bug Tracker to report a bug: https://issues.joomla.org
Post Reply
psmits
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Mar 02, 2006 9:21 pm
Location: Holland
Contact:

com_search does generate an error undefined property GitHub issue(#21832)

Post by psmits » Fri Aug 24, 2018 10:55 am

Steps to reproduce the issue

Enter a value to search for, and open one of the results
Expected result

No errors in site logging
But the error below is created
Undefined property: stdClass::$created in /components/com_search/views/search/view.html.php on line 157\n',

This is the fix I made to resolve the error
if (!empty($result->created))
/* pss 14-06-2017 fixed an error
/*if ($result->created) */ this is the line that creates the error !!
Actual result

Undefined property: stdClass::$created in /components/com_search/views/search/view.html.php on line 157\n',

The Sql instruction has been checked.
After applying the code change and reverting it, the problem can no longer be reproduced
Might be a localisation problem, because the code is used to format the date
This check is done in the code to format the date
if ($result->created)
{
$created = JHtml::('date', $result->created, JText::('DATE_FORMAT_LC3'));
}
Last edited by toivo on Fri Aug 24, 2018 3:43 pm, edited 1 time in total.
Reason: mod note: moved from Extensions for Joomla! 3.x

Post Reply

Return to “Joomla! 3.x Bug Reporting”