View Issue Details

IDProjectCategoryView StatusLast Update
0004745mantisbtotherpublic2004-11-06 06:00
Reporterryandesign Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.0 
Fixed in Version0.19.1 
Summary0004745: PHP 5 array_merge() change causes errors
Description

When accessing Mantis with PHP 5.0.1 I get this error on the main page several dozen times:

Warning: array_merge() [function.array-merge.html]: Argument 0000001 is not an array in /Library/WebServer/mantis/mantis-0.19.0/core/error_api.php on line 313

Warning: Wrong parameter count for sprintf() in /Library/WebServer/mantis/mantis-0.19.0/core/error_api.php on line 313

With PHP 4.3.6 it loads without errors.

Additional Information

Relevant is this change in PHP 5, mentioned in the README.PHP4-TO-PHP5-THIN-CHANGES file included with the PHP 5 source:

  1. array_merge() was changed to accept only arrays. If a non-array variable is
    passed, a E_WARNING will be thrown for every such parameter. Be careful
    because your code may start emitting E_WARNING out of the blue.

Possibly relevant: 0004415, 0004395.

I have not tested the latest CVS version because I do not use CVS. If you can provide a copy of the CVS version as a downloadable archive that can be unpacked and put in the web server directory, I'll be happy to test that.

TagsNo tags attached.

Relationships

has duplicate 0004395 closedvboctor PHP warnings on empty jump button 
child of 0003457 closedvboctor PHP5 issues 
child of 0004297 closedvboctor Mantis 0.19.1 release 

Activities

Thox

Thox

2004-10-22 06:28

reporter   ~0008135

The first parameter of the array_merge() needs to be changed to an array as PHP 5 will not array_merge() strings.

vboctor

vboctor

2004-10-24 09:09

manager   ~0008152

The error message is now put in an array before being passed to array_merge().