title: Warning: get_class() expects parameter 1 to be object
body: <p>I have a written a code a week back and it was working fine. But today when I chekced it gave me some problem like </p>
  
  <pre><code>Warning: get_class() expects parameter 1 to be object, array given in /home/ccc/public_html/horoscope/xml2json.php on line 182
  
  Warning: get_class() expects parameter 1 to be object, string given in /home/ccc/public_html/horoscope/xml2json.php on line 182
  
  Warning: get_class() expects parameter 1 to be object, string given in /home/ccc/public_html/horoscope/xml2json.php on line 182
  
  Warning: get_class() expects parameter 1 to be object, string given in /home/ccc/public_html/horoscope/xml2json.php on line 182
  
  Warning: get_class() expects parameter 1 to be object, string given in /home/ccc/public_html/horoscope/xml2json.php on line 182
  </code></pre>
  
  <p>The part of my code is</p>
  
  <pre><code>$currentDate = date("n/j/Y"); 
   echo($hdate);
  require_once("xml2json.php");
  
  $testXmlFile = "http://www.findyourfate.com/rss/horoscope-astrology-feed.asp?mode=view&amp;todate=$currentDate";
  echo($testXmlFile);
  $xmlStringContents = file_get_contents($testXmlFile); 
  $jsonContents = "";
  $jsonContents = xml2json::transformXmlStringToJson($xmlStringContents);
  $obj =json_decode($jsonContents);
  $rows = array();
  foreach($obj-&gt;rss-&gt;channel-&gt;item as $item) 
  </code></pre>
  
  <p>the 182 line in xml2json is </p>
  
  <pre><code>if (get_class($simpleXmlElementObject) == SIMPLE_XML_ELEMENT_PHP_CLASS) {
      // Get a copy of the simpleXmlElementObject
      $copyOfsimpleXmlElementObject = $simpleXmlElementObject;
      // Get the object variables in the SimpleXmlElement object for us to iterate.
      $simpleXmlElementObject = get_object_vars($simpleXmlElementObject);
  }       
  </code></pre>
  
  <p>here is the pastebin link for var_dump of simpleXMLElement Object </p>
  
  <p><a href="http://pastebin.com/MPQfdQVx" rel="nofollow">http://pastebin.com/MPQfdQVx</a></p>
  
  <p>Can someone please help me out that what suddenly happened that its not working.</p>
  
  <p>Thanks</p>