Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.4
-
Fix Version/s: 4.7.5
-
Component/s: Core CiviCRM
-
Labels:
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
Exports aren't working if you are using a PHP version less than 5.5. The problem is line 435 in CRM/Export/BAO/Export.php:
if (!empty(self::defaultReturnProperty($exportMode))) {
This will give an error in all PHP versions below 5.5. From the PHP manual (http://php.net/manual/en/function.empty.php): "Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error"
You should be able to fix this by replacing lines 435-437 in Export.php with something like:
$key = self::defaultReturnProperty($exportMode);
if ($key) {
$returnProperties[$key] = 1;
}
This issue has also been reported on StackExchange: http://civicrm.stackexchange.com/questions/10569/help-fatal-error-doing-an-export-civi-4-7-4