05 | 12 | 2024
Main menu
Login/Logout
 
Contacts
Реклама
Our button

Блог Ecolora

Код:

<a href="http://www.ecolora.com" target="_blank" rel="nothing" title="Ecolora.com"><img alt="Ecolora.com" height="31" src="http://www.ecolora.com/images/ecoloracom.gif" width="88" /></a>
Who's online

We have 42 guests and no members online

Лента новостей

Newsletter
Welcome, Guest
Username: Password: Remember me
Module for extravote plugin
  • Page:
  • 1
  • 2

TOPIC: Warning: Creating default object + Stars not filling in

Warning: Creating default object + Stars not filling in 10 years 6 months ago #7003

  • coachabower
  • coachabower's Avatar
  • Offline
  • Новый участник
  • Posts: 7
  • Karma: 0
Hi,

I love the idea of this module, it fits my needs very well. I'm just having a small problem, I'm thinking both of the issues mentioned in the title are related to the same underlying cause.

I'm on Joomla 3.3, php5.4, latest extravote, latest top extravote.

The top extravote module appears where I intended and displays articles. However, the rating for the displayed articles is empty. It says 0 votes and no stars are filled in. The extravote stars on the corresponding articles are there and votes have been cast.

I'm getting an error message, 1 for each article it displays that reads as follows:
Warning: Creating default object from empty value in /home1/rsmall07/public_html/testbrevardratings/modules/mod_top_extravote/helper.php on line 121

At the moment the full display looks as such:

Best Reviewed Doctors
Warning: Creating default object from empty value in /home1/rsmall07/public_html/testbrevardratings/modules/mod_top_extravote/helper.php on line 121
Warning: Creating default object from empty value in /home1/rsmall07/public_html/testbrevardratings/modules/mod_top_extravote/helper.php on line 121
Dr. Smith ( 1 Vote )
(empty stars)
Dr. Doe ( 1 Vote )
(empty stars)


I understand what the error means, and I assume the null value it is trying to use is being pulled from the database, but why is it null and how do I fix it?
Line 121 is:
$lists[$i]->sum = $row->sum;
I'm guessing $row is a row of data from what was returned by the db, and the sum index is null.

Thank you in advance and I look forward to using your module.

~Ryan
Last Edit: 10 years 6 months ago by admin.
The administrator has disabled public write access.

Warning: Creating default object + Stars not filling in 10 years 6 months ago #7004

  • coachabower
  • coachabower's Avatar
  • Offline
  • Новый участник
  • Posts: 7
  • Karma: 0
I changed $row->sum to $row->summ and the stars are there.

Now it's just the two warnings.
The administrator has disabled public write access.

Warning: Creating default object + Stars not filling in 10 years 6 months ago #7005

  • coachabower
  • coachabower's Avatar
  • Offline
  • Новый участник
  • Posts: 7
  • Karma: 0
I added:
error_reporting(E_ERROR);

to the beginning of the script, I can live with it as long as it isn't an error, but is this something I should be concerned about causing problems later?
Last Edit: 10 years 6 months ago by admin.
The administrator has disabled public write access.

Warning: Creating default object + Stars not filling in 10 years 6 months ago #7006

  • admin
  • admin's Avatar
  • Offline
  • Администратор
  • Posts: 465
  • Thank you received: 40
  • Karma: 19
I'm trying to install Joomla 3.3 on my PC (i need to upgrade php first). What some time, please...

Did You put the same question on Top Exravote page?
The administrator has disabled public write access.

Warning: Creating default object + Stars not filling in 10 years 6 months ago #7007

  • coachabower
  • coachabower's Avatar
  • Offline
  • Новый участник
  • Posts: 7
  • Karma: 0
No, I only posted here.

And the line number I was looking at may have been wrong for that warning. It may be the line where language is assigned to a variable. After looking through the database tables on my end for jom_corejoomla_rating, jom_corejoomla_rating_details, jom_content_rating and jom_content_extravote, I'm not seeing a column for language in any of the above. Maybe it was removed since your last update?

Anyway, it is working fine after suppressing the warnings. It's a great module, thank you.
The administrator has disabled public write access.

Warning: Creating default object + Stars not filling in 10 years 6 months ago #7008

  • admin
  • admin's Avatar
  • Offline
  • Администратор
  • Posts: 465
  • Thank you received: 40
  • Karma: 19
Hello,

The problem was in another line:
$lists[$i]->text = htmlspecialchars( $act[0]->title );

Now i've corrected code of module. So it works on php 5.4 without any warnings.

You could download latest version from it's site.
The administrator has disabled public write access.
The following user(s) said Thank You: coachabower
  • Page:
  • 1
  • 2
Time to create page: 0.745 seconds
for children older than 12 years