×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Notice error at the top of every article

Notice error at the top of every article 14 years 1 month ago #9207

  • hagui
  • hagui's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
Joomla version : 1.5.113
JoomlaComment version : 4.0 RC1
PHP version : 5.2.11
MySQL version : 5.1.36

At the top of every article published I can observe the following expression:
"Notice: Undefined variable: com in xxx \ www \ components \ com_comment \ joscomment \ comment.class.php on line 728 "

Obviously if I turn off "display errors" in the setting of php, the error disappears.

How can I fix this?

Thanks for your work

Notice error at the top of every article 14 years 3 weeks ago #9394

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Thanks for the report.
this doesn't make sense and it is obviously a bug
	if ($this->_preview_visible) {
	    $database =& JFactory::getDBO();
	    $database->SetQuery("SELECT * FROM jos_comment WHERE contentid='$this->_content_id' AND component='$com' AND published='1' ORDER BY date DESC");
	    $data = $database->loadAssocList();
	}

remove com from there for the moment. The next version will do this differently.
  • Page:
  • 1
Time to create page: 0.103 seconds