5.0.7 Fatal Error Using PHP 5.1.4

Enthält archivierte Beiträge von Hotschi's Board zum Download MOD.
Posten ist hier nicht möglich, bitte das Supportforum dafür verwenden!
Gesperrt
intelx86

5.0.7 Fatal Error Using PHP 5.1.4

Beitrag 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
intelx86

Beitrag 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];
						}
					}
oxpus

Beitrag 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...
Gesperrt