Opened 13 years ago

Closed 13 years ago

#337 closed defect (fixed)

PHP function errors

Reported by: anonymous Owned by: dmorton
Priority: normal Milestone: 1.0.2
Component: General Version: 1.0.1
Severity: normal Keywords:
Cc:

Description

hello! I'm running maia on FC4 with php 5.0.4 and MySQL 4.1. And I got the latest SVN checkout. It works quite fine but when I want to confirm the status of an EMail I get errors like this:

for confirming ham:

2006-05-30 13:49:12 (CEST) 2 Warning array_merge() [function.array-merge]: Argument #1 is not an array /var/www/html/maia_db.php 1849 2006-05-30 13:49:12 (CEST) 2 Warning array_merge() [function.array-merge]: Argument #2 is not an array /var/www/html/maia_db.php 1849

for del ham:

2006-05-30 13:50:48 (CEST) 2 Warning array_merge() [function.array-merge]: Argument #1 is not an array /var/www/html/maia_db.php 1722 2006-05-30 13:50:48 (CEST) 2 Warning str_repeat() [function.str-repeat]: Second argument has to be greater than or equal to 0. /var/www/html/maia_db.php 1687 [...]

Attachments (1)

maia_db.php.patch (1.0 KB) - added by anonymous 13 years ago.
this is the patch for the problem

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by anonymous

this is the patch for the problem

comment:1 Changed 13 years ago by Stefan Hoth

  • Version changed from 1.0.1 Devel to 1.0.1

Thank you very much, that one helps me.

Stefan

comment:2 Changed 13 years ago by anonymous

  • Milestone set to 1.0.2
  • Owner changed from rjl to dmorton

comment:3 Changed 13 years ago by dmorton

The problem is that php5 made a backwards incompatible change: from http://us3.php.net/array_merge

Warning

The behavior of array_merge() was modified in PHP 5. Unlike PHP 4, array_merge() now only accepts parameters of type array. However, you can use typecasting to merge other types. See the example below for details.

Example 3. array_merge() PHP 5 example
<?php
$beginning = 'foo';
$end = array(1 => 'bar');
$result = array_merge((array)$beginning, (array)$end);
print_r($result);
?> 

Thus the solution is probably a much shorter patch to add these typecasts. I need to install a php5 system somewhere to test this.

comment:4 Changed 13 years ago by dmorton

typecasts added in [1068]

comment:5 Changed 13 years ago by dmorton

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.