[Tickets #14816] foreach() on null throws Horde ERROR

[email protected]
Newsgroups gmane.comp.horde.bugs
Message-ID <[email protected]>
BITTE NICHT AUF DIESE NACHRICHT ANTWORTEN. NACHRICHTEN AN DIESE  
E-MAIL-ADRESSE WERDEN NICHT GELESEN.

Ticket-URL: https://bugs.horde.org/ticket/14816
------------------------------------------------------------------------------
  Ticket           | 14816
  Erstellt Von     | [email protected]
  Zusammenfassung  | foreach() on null throws Horde ERROR
  Warteschlange    | Horde Base
  Version          | 5.2.17
  Typ              | Bug
  Status           | Unconfirmed
  Priorität        | 1. Low
  Milestone        |
  Patch            | 1
  Zuständige       |
------------------------------------------------------------------------------


[email protected] (2018-05-14 11:22) hat geschrieben:

The setMapper() method of Horde_Rdo_Query throws an error if the used  
mapper has no non-lazy relationships.

PHP ERROR: Invalid argument supplied for foreach() [pid 5933 on line  
132 of "/usr/local/share/pear/Horde/Rdo/Query.php"]

Cause is a foreach() loop over the relationships. This is no problem  
as such but untroduces an unecessary ERROR into the logs.

I fixed this for myself by introducing the following statement in line  
130, right before the loop:

if (is_null($mapper->relationships)) {return $this;}





-- 
bugs mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.