ZF-6827: Fatal error: Call to a member function setFetchMode() on a non-object in /var/www/html/library/Zend/Db/Statement/Pdo.php on line 426

Description

I get the "Call to a member function setFetchMode() on a non-object" with a segmentation fault when i run this code:

    $locationTable = new DatabaseTable_Location();
    $locationRow = $locationTable->fetchRow('id = ' . $locationid);

and when $locationid is null.

please advise. How do I find the version of zend framework? I downloaded it a couple of months ago...

Jon

Comments

Do you get an exception, or a segfault?

You can find the version of ZF by looking in /library/Zend/Version.php . If you could test this against 1.8.2 or trunk it would be highly appreciated.

I was using 1.7.2!! Wow that's old.

I upgraded to 1.8.2. This issue seems to be resolved in 1.8.2 because I see a meaningful SQL error.

Thank you!!

Also, I tried to get the source from the svn trunk. Your "Readme.txt" indicates:

"The URL for the trunk of the Zend Framework SVN repository is: http://framework.zend.com/svn/framework/trunk"

I therefore tried to "svn ls http://framework.zend.com/svn/framework/trunk" but i get:

my-macbook-pro:library jon$ svn ls http://framework.zend.com/svn/framework/trunk svn: URL 'http://framework.zend.com/svn/framework/trunk' non-existent in that revision

So, that's a different problem I suppose.

I'm closing this issue because it apparently was solved already.

What the URL is concerned, I opened up a new issue for that: ZF-6829