@@ -542,7 +542,8 @@ public function query($condition = null, $sort = null, $offset = -1, $range = -1
542542 property_exists ($ result ->response , 'data ' ) &&
543543 property_exists ($ result , 'messages ' )
544544 ) {
545- $ fmrel = new FileMakerRelation ($ result ->response ->data , $ result ->response ->dataInfo ,
545+ $ fmrel = new FileMakerRelation ($ result ->response ->data ,
546+ property_exists ($ result ->response , 'dataInfo ' ) ? $ result ->response ->dataInfo : null ,
546547 "OK " , $ result ->messages [0 ]->code , null , $ this ->restAPI );
547548 }
548549 $ this ->restAPI ->logout ();
@@ -1349,8 +1350,12 @@ public function current()
13491350 if (isset ($ this ->data ) &&
13501351 isset ($ this ->data [$ this ->pointer ])
13511352 ) {
1352- $ dataInfo = clone $ this ->getDataInfo ();
1353- $ dataInfo ->returnedCount = 1 ;
1353+ $ tmpInfo = $ this ->getDataInfo ();
1354+ $ dataInfo = null ;
1355+ if ($ tmpInfo !== null ) {
1356+ $ dataInfo = clone $ tmpInfo ;
1357+ $ dataInfo ->returnedCount = 1 ;
1358+ }
13541359 $ value = new FileMakerRelation (
13551360 $ this ->data [$ this ->pointer ], $ dataInfo ,
13561361 ($ this ->result == "PORTAL " ) ? "PORTALRECORD " : "RECORD " ,
@@ -1751,7 +1756,11 @@ public function getProductInfo()
17511756 $ returnValue = $ this ->responseBody ->response ->productInfo ;
17521757 }
17531758 } catch (\Exception $ e ) {
1754- throw $ e ;
1759+ if ($ this ->httpStatus == 200 && $ this ->errorCode == 0 ) {
1760+ $ returnValue = array ("version " => 17 );
1761+ } else {
1762+ throw $ e ;
1763+ }
17551764 }
17561765 return $ returnValue ;
17571766 }
0 commit comments