Status: Accepted
Owner: [email protected]
Labels: Type-Defect Priority-Critical Milestone-Release-1.2.1 Component-SearchBrowse

New issue 2246 by [email protected]: Fatal error reindexing with ZSL
http://code.google.com/p/qubit-toolkit/issues/detail?id=2246

To reproduce this error:
========================
1) search:populate QubitSearch

Resulting error:
================

QubitSearch >> Foo inserted (30.43s) (13/15)
QubitSearch >> Bar inserted (30.47s) (14/15)
PHP Fatal error: Call to a member function getTitle() on a non-object in lib/QubitSearch.class.php on line 421

Fatal error: Call to a member function getTitle() on a non-object in lib/QubitSearch.class.php on line 421

This was a fast fix I did:

Index: lib/QubitSearch.class.php
===================================================================
--- lib/QubitSearch.class.php   (revision 10172)
+++ lib/QubitSearch.class.php   (working copy)
@@ -418,7 +418,10 @@

$doc->addField(Zend_Search_Lucene_Field::UnIndexed('collectionRootId', $informationObject->getCollectionRoot()->id)); $doc->addField(Zend_Search_Lucene_Field::Keyword('collectionRootSlug', $informationObject->getCollectionRoot()->slug)); - $doc->addField(Zend_Search_Lucene_Field::UnIndexed('collectionRootTitle', $informationObject->getCollectionRoot()->getTitle()));
+    if (null !== $informationObject->getCollectionRoot())
+    {
+ $doc->addField(Zend_Search_Lucene_Field::UnIndexed('collectionRootTitle', $informationObject->getCollectionRoot()->getTitle()));
+    }

     // Digital object information
     if ($digitalObject = $informationObject->getDigitalObject())


--
You received this message because you are subscribed to the Google Groups "Qubit 
Toolkit Issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/qubit-issues?hl=en.

Reply via email to