anuj607 / google-api-php-client

Automatically exported from code.google.com/p/google-api-php-client
Apache License 2.0
0 stars 0 forks source link

Fatal error: Class name must be a valid object or a string in apiClient.php line 99 #175

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
public function __construct($config = array()) {
    global $apiConfig;
    $apiConfig = array_merge((array)$apiConfig, (array)$config);
  99  self::$cache = new $apiConfig['cacheClass']();
  100  self::$auth = new $apiConfig['authClass']();
  101  self::$io = new $apiConfig['ioClass']();
  }

Why is it giving such an error?

Original issue reported on code.google.com by samuel.o...@covenantuniversity.edu.ng on 16 Aug 2012 at 9:26

GoogleCodeExporter commented 9 years ago
I am getting the exact same error, but only on my production server, not on my 
development or staging server. All servers are running the same version of PHP.

Original comment by j...@qccreative.com on 22 Aug 2012 at 12:56

GoogleCodeExporter commented 9 years ago
Also $apiConfig contains NULL and I get a notice on line 98 for attempting to 
array_merge() a null value.

Original comment by j...@qccreative.com on 22 Aug 2012 at 12:58

GoogleCodeExporter commented 9 years ago
Have you made any changes to src/config.php? I was also wondering if you're 
using the latest version of the Google APIs PHP Client on trunk.

Original comment by chirags@google.com on 27 Aug 2012 at 8:56