bugphpGroupWare - Bugs: bug #13504, Fatal error in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #13504: Fatal error in class.sql_builder.inc.php with php5

Submitted by:  None
Submitted on:  Wed 22 Jun 2005 02:35:00 PM UTC  
 
Item Group: NoneCategory: API - phpGroupware API
Severity: 3 - NormalPriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Component Version: NoneOperating System: None
Reproducibility: NonePlanned Release: None
Fixed Release: 

Thu 14 Jul 2005 07:23:01 AM UTC, comment #1:

Also, it seems to merge null entries, so the region of code:
foreach ($links as $entity => $link)
{
must appear with a conditional (easy fix):

foreach ($links as $entity => $link)
{
if($entity!=""){

Anonymous
Wed 22 Jun 2005 02:35:00 PM UTC, original submission:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in c:\www\buromax-intranet\phpgwapi\inc\class.sql_builder.inc.php on line 260

Warning: Invalid argument supplied for foreach() in c:\www\buromax-intranet\phpgwapi\inc\class.sql_builder.inc.php on line 263

Fatal error: Call to a member function get_identity() on a non-object in c:\www\buromax-intranet\phpgwapi\inc\class.sql_builder.inc.php on line 334

Fix :

near line 259 -> 261, change :

$links = array_merge($this->entities[$entity_name]->get_ilinks(),
$this->entities[$entity_name]->get_elinks());

For :

$links = array_merge((array)$this->entities[$entity_name]->get_ilinks(),
(array)$this->entities[$entity_name]->get_elinks());

As per the php doc :

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.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follows 1 latest change.

Date Changed By Updated Field Previous Value => Replaced By
Wed 22 Jun 2005 02:42:08 PM UTCcafefroidCarbon-Copy-=>Added cafefroid

Back to the top


Powered by Savane 3.1-cleanup1