Seite 1 von 1

5.0.7 Fatal Error Using PHP 5.1.4

Verfasst: Di 13.Jun, 2006 16:31
von intelx86
I installed the Download Mod 5.0.7
When I create a category from control panel and try to access he download section, I get the following message probably because the category is empty.
Fatal error: Cannot use string offset as an array in .../dl_mod/classes/class_dlmod.php on line 455
View Error

Verfasst: Do 15.Jun, 2006 12:43
von intelx86
Finally, its the same problem as I have already posted.
Solution:

Find:

Code: Alles auswählen

					if ($this->dl_file_icon['new_sum'][$cat_id])
					{
						$mini_status_icon[$cur]['new'] += $this->dl_file_icon['new_sum'][$cat_id];
					}

					if ($this->dl_file_icon['edit_sum'][$cat_id])
					{
						$mini_status_icon[$cur]['edit'] += $this->dl_file_icon['edit_sum'][$cat_id];
					}
Replace with

Code: Alles auswählen

					if ($this->dl_index[$cat_id]['total'] > 0)
					{
						if ($this->dl_file_icon['new_sum'][$cat_id])
						{
							$mini_status_icon[$cur]['new'] += $this->dl_file_icon['new_sum'][$cat_id];
						}
	
						if ($this->dl_file_icon['edit_sum'][$cat_id])
						{
							$mini_status_icon[$cur]['edit'] += $this->dl_file_icon['edit_sum'][$cat_id];
						}
					}

Verfasst: Do 15.Jun, 2006 16:38
von oxpus
Again:
I can't reproduce this error by myself!

I've now re-uploaded the new 5.0.8 with your changes.
Please use the new class_dlmod.php (the update from 5.0.7 to 5.0.8 and changing the MOD release number on database)...

EDIT
Now (17:30) I updated the package again.
I found a wrong initialization for the array.
Fixing this and using your changes the download index might now works errorfree on empty categories.
Still replace the class_dlmod.php...