Skip to content

Commit

Permalink
Merge branch 'container-base64-hotfix'
Browse files Browse the repository at this point in the history
  • Loading branch information
gav- committed Mar 7, 2019
2 parents 4b0c24c + e5cfa38 commit 78dfe2d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 5.2.2 (Released 2019-03-07) ###
- Fix base64 container encoding warnings in PHP 5.6

### 5.2.1 (Released 2019-02-05) ###
- Reset reporting level for production systems.

Expand Down
6 changes: 5 additions & 1 deletion lib/RESTfm/BackendFileMaker/FileMakerOpsLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ public function read () {
if (preg_match('/^\/fmi\/xml\/cnt\/([^\?]*)\?/', $fieldData, $matches)) {
$filename = $matches[1] . ';';
}
$fieldData = $filename . base64_encode($FM->getContainerData($record->getField($fieldName, $repetition)));
$containerData = $FM->getContainerData($record->getField($fieldName, $repetition));
if (gettype($containerData) !== 'string') {
$containerData = "";
}
$fieldData = $filename . base64_encode($containerData);
break;
case self::CONTAINER_RAW:
// TODO
Expand Down
6 changes: 5 additions & 1 deletion lib/RESTfm/BackendFileMaker/FileMakerOpsRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,11 @@ protected function _parseRecord (\RESTfm\Message\Message $restfmMessage, \FileMa
if (preg_match('/^\/fmi\/xml\/cnt\/([^\?]*)\?/', $fieldData, $matches)) {
$filename = $matches[1] . ';';
}
$fieldData = $filename . base64_encode($FM->getContainerData($record->getField($fieldName, $repetition)));
$containerData = $FM->getContainerData($record->getField($fieldName, $repetition));
if (gettype($containerData) !== 'string') {
$containerData = "";
}
$fieldData = $filename . base64_encode($containerData);
break;
case self::CONTAINER_RAW:
// TODO
Expand Down
2 changes: 1 addition & 1 deletion lib/RESTfm/Version.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* Version static class to hold release version.
*/
class Version {
private static $_release = '5.2.1';
private static $_release = '5.2.2';
private static $_revision = '%%REVISION%%';
private static $_protocol = '6'; // Bump this when REST API changes.

Expand Down

0 comments on commit 78dfe2d

Please sign in to comment.