Seite 1 von 1
Download Mod 5.0.6 Fatal error using PHP 5.1.4
Verfasst: Mo 05.Jun, 2006 20:16
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
Verfasst: Di 06.Jun, 2006 18:43
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]);
Verfasst: Di 06.Jun, 2006 18:45
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]);
Verfasst: Di 06.Jun, 2006 19:40
von oxpus
Hm, I can't reproduce this error.
Can you post the settings for this category?
Verfasst: Di 06.Jun, 2006 22:49
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
Verfasst: Di 06.Jun, 2006 23:05
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...
Verfasst: Mi 07.Jun, 2006 00:03
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.
Verfasst: Mi 07.Jun, 2006 00:46
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]);
}
Verfasst: Do 08.Jun, 2006 00:18
von oxpus
Hm, okay, I'll change the file in the next release.
Thanks for this.
Verfasst: Do 08.Jun, 2006 00:20
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.
Verfasst: Do 08.Jun, 2006 00:23
von oxpus
Just without ... 0

Verfasst: Do 08.Jun, 2006 00:25
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!
