title: DateTime object cloning Fatal error: __clone method called on non-object in Magento Model
body: <p>I just encountered strange thing going on while working on custom Magento Model. </p>
  
  <p>Model is called as singleton and works:</p>
  
  <p>While trying to clone object property <strong>second</strong> time it results in fatal error.</p>
  
  <pre><code>function someFunction1() {
       $datetime_from = clone $this-&gt;from;
  
  }
  </code></pre>
  
  <p>On the other hand, this function:</p>
  
  <pre><code>function someFunction2() {
      echo '&lt;pre&gt;'.__FILE__.':'.__LINE__.'&lt;br&gt;';
      var_export(gettype($this-&gt;from));
      echo '&lt;/pre&gt;';
      $datetime_from = clone $this-&gt;from;
  }
  </code></pre>
  
  <p>results in:</p>
  
  <blockquote>
    <p>...\Model\Data.php:230</p>
    
    <p>'object'</p>
    
    <p>true</p>
    
    <p>Fatal error: __clone method called on non-object in
    Q:\magento\app\code\local\Tece\Goals\Model\Data.php on line 235</p>
  </blockquote>