Support Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Notice: Undefined property: stdClass::$created in
(1 viewing) 1 Guest
Go to bottomPost New TopicPost Reply
TOPIC: Notice: Undefined property: stdClass::$created in
#15
Patrick

Notice: Undefined property: stdClass::$created in 7 Months ago  
Hi there,

Just bought your plugin, and works well except for an error message I recieve. I´m not entirely sure that it applies to your plugin, but it was not displayed prior to using it. The error message is:

Notice: Undefined property: stdClass::$created in public_html/components/com_search/views/search/view.html.php on line 148

Any ideas?
 
Logged Logged
  Reply Quote
#17
Chris Martyniuk
Administrator
Posts: 12
graph
User Offline Click here to see the profile of this user
Re:Notice: Undefined property: stdClass::$created in 7 Months ago Karma: 0
Hejsan,

The code causing the warning is in the standard joomla search component template:

if ($result->created) {
$created = JHTML::Date ( $result->created );
}
else {
$created = '';
}

Some of the items returned by the search plugin do not have a 'created' timestamp that is relevant so I don't return one. Well okay maybe I should do this, but what is the 'created' timestamp for a user -- date joined? Anyhow...

The default template is designed to deal with this situation and most systems will not show the warning but it looks like your server has stricter error reporting.

What is your PHP error_reporting settings (see under Help > System Info on Joomla Admin)? Also what is your Error Reporting setting under Server Settings in Joomla's Global Configuration?

The easiest fix is just to change that line to:

if (@$result->created) {

The @ suppresses any warning/error output.

Cheers,

Chris .\\
 
Logged Logged
  Reply Quote
#18
Patrick

Re:Notice: Undefined property: stdClass::$created in 7 Months ago  
Alright, a quick and dirty...

But it did fix it, thanks,

//Patrick
 
Logged Logged
  Reply Quote
Go to topPost New TopicPost Reply
Copyright © 2010 Chris Martyniuk. All Rights Reserved.