Download Mod 5.0.6 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

Download Mod 5.0.6 Fatal error using PHP 5.1.4

Beitrag von intelx86 »

When I create a category from the admin panel, and try to access downloads.php I get the following:
Fatal error: Cannot use string offset as an array in C:\Program Files\Abyss Web Server\htdocs\dl_mod\classes\class_dlmod.php on line 454
See by yourself
oxpus

Beitrag von oxpus »

Please can you post your line 454 of your class_dlmod.php?
On original this line will be

Code: Alles auswählen

					$mini_status_icon[$cur]['new'] += intval($this->dl_file_icon['new_sum'][$cat_id]);
intelx86

Beitrag von intelx86 »

It's the original one

Code: Alles auswählen

$mini_status_icon[$cur]['new'] += intval($this->dl_file_icon['new_sum'][$cat_id]);
oxpus

Beitrag von oxpus »

Hm, I can't reproduce this error.
Can you post the settings for this category?
intelx86

Beitrag von intelx86 »

Name: Email tools
Path: /
Description: <empty>
Parent category: >> Highest Level
Uploads into this category must be approved: Yes
Allow mod descriptions on upload: No
Enable detailed statistics: Yes
Prune statistical data: 100000
Comments: Yes
Automatically approve every new comment: No
Traffic quote (currently off): 0 KB
Permisions
View = True
Download = True
Upload: False
Moderate: False
Read comments: Everybody
Write comments: Registered users
oxpus

Beitrag von oxpus »

Hm, please download the mod again and replace each file.
On my testboard, which runs on PHP 5.1.4, too, I don't get this error.
And your settings to the categoriy are correct...
intelx86

Beitrag von intelx86 »

I commented lines 454 & 455, uploded a file
and then uncommented the lines.
No error occured.
When I deleted the file, the error returned.

I suppose the problem occurs when the category is empty
because, it should display the last file's icon.
intelx86

Beitrag von intelx86 »

I think I've found a solution. Tell me if I'm right. Anyway it works!

Find

Code: Alles auswählen

$mini_status_icon[$cur]['new'] += intval($this->dl_file_icon['new_sum'][$cat_id]);
$mini_status_icon[$cur]['edit'] += intval($this->dl_file_icon['edit_sum'][$cat_id]);
Replace with

Code: Alles auswählen

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

Beitrag von oxpus »

Hm, okay, I'll change the file in the next release.
Thanks for this.
intelx86

Beitrag von intelx86 »

oxpus hat geschrieben:Hm, okay, I'll change the file in the next release.
Thanks for this.
Instead of the symbol <> use just >.
I think its better.
oxpus

Beitrag von oxpus »

Just without ... 0 ;)
intelx86

Beitrag von intelx86 »

oxpus hat geschrieben:Just without ... 0 ;)
I don't really get it! I am not programming in php. Only in VB .Net so I do not understand what do you mean. I'll just wait for the next release! :D
Gesperrt