YiiSolr icon indicating copy to clipboard operation
YiiSolr copied to clipboard

Issue with attributeNames() method called on instances create by ASolrDocument::model()

Open nikhiltri opened this issue 8 years ago • 0 comments

Hello,

I'm having some trouble with new instances of objects created with the static ASolrDocument::model(). I created a test to verify what I'm seeing. When I run testAttributeNamesFromStaticModelMethod() I get the following error:

PHP Fatal error:  Call to a member function toArray() on a non-object in ASolrDocument.php on line 127

Fatal error: Call to a member function toArray() on a non-object in ASolrDocument.php on line 127

It looks like the init() method doesn't get run when you create an object in this way? Any help would be appreciated.

Thanks! nikhil

nikhiltri avatar Oct 24 '16 15:10 nikhiltri