yvesima Posted April 18, 2014 Share Posted April 18, 2014 Hello I've tied to change prestashop 1.6 latest version of domain and directory to put it on my local wamp I've these errors Warning: Invalid argument supplied for foreach() in D:\wamp2013\www\prestashop_comptoir\classes\shop\Shop.php on line 321 Fatal error: Call to a member function fetch() on a non-object in D:\wamp2013\www\prestashop_comptoir\classes\db\DbPDO.php on line 101 Have you an idea Thanks Link to comment Share on other sites More sharing options...
NemoPS Posted April 18, 2014 Share Posted April 18, 2014 It seems it can't get any shop. Can you specify your settings? Link to comment Share on other sites More sharing options...
vekia Posted April 18, 2014 Share Posted April 18, 2014 you imported also database? or only files? Link to comment Share on other sites More sharing options...
jokerstar Posted November 16, 2014 Share Posted November 16, 2014 I have same problem, I imported both files from FTP and DB files. but there is a error: Fatal error: Call to a member function fetch() on a non-object in D:\wamp2013\www\prestashop_comptoir\classes\db\DbPDO.php on line 101 Link to comment Share on other sites More sharing options...
NemoPS Posted November 17, 2014 Share Posted November 17, 2014 Did you make sure database access credentials are okay? It looks like nextRow() is not properly working, as $result is not an object. Can you copy/paste here those whereabouts of the DbPDO.php file? Link to comment Share on other sites More sharing options...
jokerstar Posted November 17, 2014 Share Posted November 17, 2014 Hello, thanks for reply. I am sure that DB acces is OK. Here is problem function: 97**public function nextRow($result = false) 98**{ 99**if (!$result) 100**$result = $this->result; 101**return $result->fetch(PDO::FETCH_ASSOC); 102**} 97** ... are lines imagine it without this numbers and ** Link to comment Share on other sites More sharing options...
NemoPS Posted November 17, 2014 Share Posted November 17, 2014 That's not exactly how it should be, try with public function nextRow($result = false) { if (!$result) $result = $this->result; if (!is_object($result)) return false; return $result->fetch(PDO::FETCH_ASSOC); } 1 Link to comment Share on other sites More sharing options...
jokerstar Posted November 17, 2014 Share Posted November 17, 2014 Ooooo MAN you are king!!!!!!!! Thanks it works!!! Great I spent on it whole weekend without success... Really thanks. But tell me how is it possible that it works on FTP with original function - which I wrote above? Link to comment Share on other sites More sharing options...
NemoPS Posted November 19, 2014 Share Posted November 19, 2014 Well, it works till it tries to parse an existing, yet non-object variable. I guess it's a matter of luck Link to comment Share on other sites More sharing options...
Recommended Posts