TypeError

get_class(): Argument #1 ($object) must be of type object, bool given

/home/pwj2d7hixaun/public_html/unoshoonya.com/protected/extensions/bitly/VGBitly.php(578)

566      */
567     public function getErrorMessage()
568     {
569         return $this->errorMessage;
570     }
571     
572     /**
573      * @return array - Convert a SimpleXML object to an array so we
574      * Could safely store it in the cache and retrieve it when needed.
575      */
576     protected function simplexml2array($xml) 
577     {
578         if (get_class($xml) == 'SimpleXMLElement') 
579         {
580             $attributes = $xml->attributes();
581             foreach($attributes as $k=>$v) 
582             {
583                 if ($v) $a[$k] = (string) $v;
584             }
585             $x = $xml;
586             $xml = get_object_vars($xml);
587         }
588         if (is_array($xml)) 
589         {
590             if (count($xml) == 0) return (string) $x; // for CDATA

Stack Trace

#0
+
 /home/pwj2d7hixaun/public_html/unoshoonya.com/protected/extensions/bitly/VGBitly.php(488): VGBitly->simplexml2array()
483             if( ( $xml !== false && isset($xml->error) ) && $this->throwExceptions ) 
484             {
485                 throw new CException($xml->error);
486             }
487             
488             $this->setResponseData( $this->simplexml2array($xml) );
489         }
490         else if ( ( $this->format == 'json' ) && ( $this->returnAsArray ) )
491         {
492             $this->setResponseData(CJSON::decode($this->response));
493         }
#1
+
 /home/pwj2d7hixaun/public_html/unoshoonya.com/protected/extensions/bitly/VGBitly.php(413): VGBitly->doCall()
408                 return $this;
409             }
410         }
411         
412         // Make the call
413         $this->doCall( $this->apiCallType );
414         
415         // We store it in the cache if we need to
416         if(isset($cache) && $cache !== null)
417         {
418             $cache->set(self::CACHE_KEY . $this->apiCallType . implode(':', $this->postParams), $this->getResponseData(), $this->cachingDuration);
#2
+
 /home/pwj2d7hixaun/public_html/unoshoonya.com/protected/extensions/bitly/VGBitly.php(203): VGBitly->get()
198      * 
199      */
200     public function shorten( $uri=null, $login=null, $apiKey=null, $format=null )
201     {
202         $this->postParams['longUrl'] = $uri;    
203         return $this->get('shorten', $login, $apiKey, $format);
204     }
205     
206     /**
207      * Expand URL callback
208      * ---------------------
2024-03-29 00:38:21 Apache Yii Framework/1.1.15