Dave, The main problem was the variable I used for the index was going out of scope. I had created a static class for searching, updating, deleting etc. I had forgotten to craate a private static property for the index. I was just calling a static method to get the index and when the method was complete the index went out of scope and __destruct was called in Lucene.php
if you want a code example let me know. HTH, Andrew dtra wrote: > > Hello Andrew > > Can you elaborate on how you caused this error? > i am having the same problem, but i don't know what the problem is > my code was working in 0.93 > > thanks > dave > > > Andrew Craft wrote: >> >> Alexander, >> >> I caused the error. Sorry for jumping the gun on making a post. >> >> Thanks, >> Andrew >> >> >> Alexander Veremyev wrote: >>> >>> Hi Andrew, >>> >>> Could you give an example of your code? >>> >>> It looks like close() method is invoked before getDocument(). >>> But close() method is internal and should be invoked only when index >>> object goes out of scope. >>> >>> >>> With best regards, >>> Alexander Veremyev. >>> >>> Andrew Craft wrote: >>>> Zend Framework Version: 1.0.0 RC1 >>>> >>>> In file Zend\Search\Lucene.php >>>> >>>> When running a search and calling getDocument() on the result set. >>>> >>>> The following error is raised: Invalid argument supplied for foreach(), >>>> on >>>> line 682 >>>> >>>> $this->_segmentInfos is looped but is set to null when the foreach >>>> occurs. >>>> I havent dug in to zend search yet so if anyone knows of a fix it would >>>> be >>>> greatly appreciated. >>>> >>>> I have also rebuilt the search index using this version. >>>> >>>> This happens when I am looping through the search results. >>>> >>>> Thanks in advance, >>>> >>>> Andrew >>> >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/Zend-Search-Error-tf3841306s16154.html#a10948565 Sent from the Zend Framework mailing list archive at Nabble.com.
