Skip to content

Commit d85a278

Browse files
committed
Bug fix about #46
1 parent 137f527 commit d85a278

7 files changed

Lines changed: 900 additions & 1451 deletions

File tree

FMDataAPI.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
/**
44
* Object-oriented class for the REST API in FileMaker Server 18/Cloud.
55
*
6-
* @version 20.0
6+
* @version 21.0
77
* @author Masayuki Nii <nii@msyk.net>
8-
* @copyright 2017-2019 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
8+
* @copyright 2017-2020 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
99
*/
1010

1111
namespace INTERMediator\FileMakerServer\RESTAPI;
@@ -21,9 +21,9 @@
2121
* @link https://github.com/msyk/FMDataAPI GitHub Repository
2222
* @property-read FileMakerLayout $<<layout_name>> Returns the FileMakerLayout object from the layout named with the property.
2323
* If the layout doesn't exist, no error arises here. Any errors might arise on methods of FileMakerLayout class.
24-
* @version 20
24+
* @version 21
2525
* @author Masayuki Nii <nii@msyk.net>
26-
* @copyright 2017-2019 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
26+
* @copyright 2017-2020 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
2727
* @source 1 100000 The source code.
2828
*/
2929
class FMDataAPI
@@ -363,9 +363,9 @@ public function getReturnedCount()
363363
*
364364
* @package INTER-Mediator\FileMakerServer\RESTAPI
365365
* @link https://github.com/msyk/FMDataAPI GitHub Repository
366-
* @version 20
366+
* @version 21
367367
* @author Masayuki Nii <nii@msyk.net>
368-
* @copyright 2017-2019 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
368+
* @copyright 2017-2020 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
369369
*/
370370
class FileMakerLayout
371371
{
@@ -961,9 +961,9 @@ public function getScriptResultPresort()
961961
* @property string $<<field_name>> The field value named as the property name.
962962
* @property FileMakerRelation $<<portal_name>> FileMakerRelation object associated with the property name.
963963
* The table occurrence name of the portal can be the 'portal_name,' and also the object name of the portal.
964-
* @version 02
964+
* @version 21
965965
* @author Masayuki Nii <nii@msyk.net>
966-
* @copyright 2017-2019 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
966+
* @copyright 2017-2020 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
967967
*/
968968
class FileMakerRelation implements \Iterator
969969
{
@@ -1272,6 +1272,8 @@ public function field($name, $toName = null)
12721272
$this->data->portalData->$name,
12731273
property_exists($this->data, 'portalDataInfo') ? $this->data->portalDataInfo : null,
12741274
"PORTAL", 0, $name, $this->restAPI);
1275+
} else if (isset($this->data->fieldData->$fieldName)){
1276+
$value = $this->data->fieldData->$fieldName;
12751277
}
12761278
break;
12771279
case "PORTALRECORD":
@@ -1441,9 +1443,9 @@ public function rewind()
14411443
*
14421444
* @package INTER-Mediator\FileMakerServer\RESTAPI
14431445
* @link https://github.com/msyk/FMDataAPI GitHub Repository
1444-
* @version 20
1446+
* @version 21
14451447
* @author Masayuki Nii <nii@msyk.net>
1446-
* @copyright 2017-2019 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
1448+
* @copyright 2017-2020 Masayuki Nii (FileMaker is registered trademarks of FileMaker, Inc. in the U.S. and other countries.)
14471449
*/
14481450
class CommunicationProvider
14491451
{

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ MIT License
146146
Add the duplicate() method to the FileMakerLayout class. Thanks to schube.
147147
- 2019-09-16: [Ver.20]
148148
The default values of limit and range parameters are changed to 0 and both just applied for over 0 values. Thanks to schube.
149+
- 2019-09-16: [Ver.21]
150+
Bug fix about the field referencing of a related field without any portals. Thanks to frankeg.
149151

150152
## API Differences between ver.8 and 7.
151153
### FMDataAPI class

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "inter-mediator/fmdataapi",
3-
"version": "20",
4-
"time": "2019-09-16",
3+
"version": "21",
4+
"time": "2020-08-23",
55
"repositories": [
66
{
77
"type": "git",

0 commit comments

Comments
 (0)