Development

#3368: SfOptimizedObjectBuilder.php.patch

You must first sign up to be able to contribute.

Ticket #3368: SfOptimizedObjectBuilder.php.patch

File SfOptimizedObjectBuilder.php.patch, 0.6 kB (added by gilles.doge, 9 months ago)

Patch to SfOptimizedObjectBuilder?.php

  • SfOptimizedObjectBuilder.php

    old new  
    3030        $varName = $this->getFKVarName($fk); 
    3131        $return = 'return $this->' . $varName . ';'; 
    3232        $check_null_hydrated_script = ' 
    33         if (!$this->' . $varName . '->isNew() && is_null($this->' . $varName . '->getPrimaryKey())) { 
     33        if (!null($this->' . $varName . ') && !$this->' . $varName . '->isNew() && is_null($this->' . $varName . '->getPrimaryKey())) { 
    3434          return NULL; 
    3535        } 
    3636        ' . $return;