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

Submitter:  None
Submitted:  Wed 22 Jun 2005 02:35:00 PM UTC
   
 
Category:  API - phpGroupware API Item Group:  None
Severity:  3 - Normal Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  None Operating System:  None
Reproducibility:  None Planned 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

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2005-06-22 cafefroid Carbon-Copy- Added cafefroid

Back to the top

Powered by Savane 3.13-bb6a.
Corresponding source code