title: Fatal error: Uncaught TypeError: Argument 1 passed to Mage_Core_Model_Store:
body: <p>I have my magento ecommerce website hosted on Godaddy. It is version 1.9.2.2. I attempted to restore a database backup but I got a 503 service unavailable error. So I decided to attempt the entire files backup. In the process I got a system and an exception error below. I am not sure whether the site broke when I attempted the database restore or the files restore.</p>
  
  <pre><code>Fatal error: Uncaught TypeError: Argument 1 passed to Mage_Core_Model_Store::setWebsite() must be an instance of Mage_Core_Model_Website, null given, called in /home/tre76767667/public_html/app/code/core/Mage/Core/Model/App.php on line 645 and defined in /home/tre76767667/public_html/app/code/core/Mage/Core/Model/Store.php:453 
  Stack trace:
   #0 /home/tre76767667/public_html/app/code/core/Mage/Core/Model/App.php(645): Mage_Core_Model_Store-&gt;setWebsite(NULL)
   #1 /home/tre76767667/public_html/app/code/core/Mage/Core/Model/App.php(477): Mage_Core_Model_App-&gt;_initStores()
   #2 /home/tre76767667/public_html/app/code/core/Mage/Core/Model/App.php(360): Mage_Core_Model_App-&gt;_initCurrentStore('', 'store')
   #3 /home/tre76767667/public_html/app/Mage.php(683): Mage_Core_Model_App-&gt;run(Array)
   #4 /home/tre76767667/public_html/index.php(68): Mage::run('', 'store')
   #5 {main} thrown in /home/tre76767667/public_html/app/code/core/Mage/Core/Model/Store.php on line 453
  </code></pre>
  
  <p>In the error_log I got this:</p>
  
  <pre><code>[11-Dec-2019 21:09:02 UTC] PHP Notice:  Undefined index: SCRIPT_NAME in /home/tre76767667/public_html/cron.php on line 40
  [11-Dec-2019 21:09:02 UTC] PHP Notice:  Undefined index: SCRIPT_FILENAME in /home/tre76767667/public_html/cron.php on line 41
  </code></pre>
  
  <p>Please can someone help me with how I can solve this? </p>