Ralf Lang <lang <at> b1-systems.de> writes: > > > Found something in the php log file: > > [14-Dec-2012 22:25:32 UTC] PHP Fatal error: Call to a member function rewind > > () on a non-object in C:\php\pear\Horde\Imap\Client\Socket.php on line 2878 > > > > Is a non-object in php the same as a null? > > It seems not, because just before line 2878 there is following test: > > if (is_null($data)) { > > return $params; > > } > > > > A non-object is anything but an object, including null, integer, > strings, resources and arrays. > > -- > Ralf Lang > Linux Consultant / Developer > Tel.: +49-170-6381563 > Mail: lang <at> b1-systems.de > > B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / > http://www.b1-systems.de > GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537 >
Ok, it's like a class object in other languages. The error occurs in C:\php\pear\Horde\Imap\Client\Socket.php /** * Helper function to parse a parameters-like tokenized array. * @param mixed $data Message data. Either a Horde_Imap_Client_Tokenize * object or null. * @param string $type The header name. * @return array The parameter array. */ protected function _parseStructureParams($data, $type) { $params = array(); if (is_null($data)) { return $params; } $name = $data->rewind(); do { $params[strtolower($name)] = $data->next(); } while (($name = $data->next()) !== false); $ret = Horde_Mime::decodeParam($type, $params); return $ret['params']; } The $data entering the method is sometimes not an object, causing the php fatal error. The only place I see in socket.php where it is possible to enter the method with something not an object is at line 2845 // This is disposition information if (is_object($tmp = $data->next())) { $ob->setDisposition($tmp->rewind()); foreach ($this->_parseStructureParams($tmp->next(), 'content- disposition') as $key => $val) { $ob->setDispositionParameter($key, $val); } } $tmp->next() is not protected by a 'is_ojbect' Correct? Eric -- imp mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: imp-unsubscr...@lists.horde.org