0012264: PHP Fatal Error after upgrade in CustomField.php
authorPhilipp Schüle <p.schuele@metaways.de>
Mon, 24 Oct 2016 11:55:03 +0000 (13:55 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Mon, 24 Oct 2016 13:43:13 +0000 (15:43 +0200)
* fix for php 5.3 + 5.4
*  PHP before 5.5 didn’t support references to temporary values returned from functions

https://forge.tine20.org/view.php?id=12264

Change-Id: I4ae477fe245a7e21eab52460fd44a0cf0d2fde3b
Reviewed-on: http://gerrit.tine20.com/customers/3675
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Tinebase/CustomField.php

index 4264ed4..e4d147c 100644 (file)
@@ -743,7 +743,8 @@ class Tinebase_CustomField implements Tinebase_Controller_SearchInterface
 
     public function saveCustomFieldValue(Tinebase_Model_CustomField_Value $_record)
     {
 
     public function saveCustomFieldValue(Tinebase_Model_CustomField_Value $_record)
     {
-        if (!empty($_record->getId())) {
+        $recordId = $_record->getId();
+        if (! empty($recordId)) {
             return $this->_backendValue->update($_record);
         }
         return $this->_backendValue->create($_record);
             return $this->_backendValue->update($_record);
         }
         return $this->_backendValue->create($_record);