ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Fatal error: Call to a member function

April 05, 2012 5:27pm

Subscribe [2]
  • #1 / Apr 05, 2012 5:27pm

    jwmatlock

    14 posts

    Hi,

    I’ve recently upgraded an EE1 site to EE2. I first did this locally and then moved everything up to the live server and updated the database. When I load the site, I get white screens. Forcing it to show the errors, this is what I get:

    Fatal error: Call to a member function num_rows() on a non-object in /home/site_account/public_html/system/expressionengine/libraries/Core.php on line 302

    Any suggestions for what to try? I’ve created new databases, removed and re-uploaded all the files, but with the same results. Thanks!
    (note: the system directory names have been changed. 😊 )

  • #2 / Apr 05, 2012 10:35pm

    glenndavisgroup

    436 posts

    Hi jwmatlock,

    Do you have any third party add-ons installed? If so, have you checked to see if they have any updates for EE2? This error sounds like it could be related to an add-on.

    Mike

  • #3 / Apr 06, 2012 8:42am

    jwmatlock

    14 posts

    I believe all my third party add-ons were uninstalled, or disabled, during the EE1 to EE2 upgrade. And, when looking at EE running on my local machine there doesn’t appear to be any third party add-ons showing up in the admin.

  • #4 / Apr 06, 2012 2:05pm

    Robin Sowell

    13255 posts

    Hrm- I can’t see any reason for that line to error (and I can’t replicate the error).  It’s possible something didn’t get uploaded properly.  It may be worth deleting your library folder and uploading a fresh copy.  You are running 2.4 now- correct?

    If that doesn’t do it- what do you have around line 302 in Core.php?

    if (REQ == 'ACTION' OR REQ == 'PAGE')
      {
       // load up any Snippets
       $this->EE->db->select('snippet_name, snippet_contents');
       $this->EE->db->where('(site_id = '.$this->EE->db->escape_str($this->EE->config->item('site_id')).' OR site_id = 0)');
       $fresh = $this->EE->db->get('snippets');
    
       if ($fresh->num_rows() > 0)

    That last line is what I see as the error line.  If you’re still getting the error after re-uploading files?  Is it possible to do a var_dump just before the error line?

    if (REQ == 'ACTION' OR REQ == 'PAGE')
      {
       // load up any Snippets
       $this->EE->db->select('snippet_name, snippet_contents');
       $this->EE->db->where('(site_id = '.$this->EE->db->escape_str($this->EE->config->item('site_id')).' OR site_id = 0)');
       $fresh = $this->EE->db->get('snippets');
    
    var_dump($fresh); exit;
       if ($fresh->num_rows() > 0)
       {

    It will break the page, but the page is already broken.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases