Skip to content

Commit a8d2598

Browse files
committed
Fix a problem with 80360,80361 tests
1 parent 9262399 commit a8d2598

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

XBRL-Functions.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
use lyquidity\XPath2\XPath2Context;
5252
use lyquidity\XPath2\XPath2Expression;
5353
use lyquidity\XPath2\XPath2Item;
54+
use lyquidity\XPath2\XPath2NodeIterator;
5455
use lyquidity\XPath2\XPath2NodeIterator\SingleIterator;
5556

5657
$functionTable = FunctionTable::getInstance();
@@ -922,7 +923,9 @@ public static function checkFilings( $findExpression, $fiExpression, $template,
922923
try
923924
{
924925
$result = FunctionUtilities::executeExpression( $findExpression, $context, $provider, $parameters );
925-
return $result >= 1 ? CoreFuncs::$True : CoreFuncs::$False;
926+
return $result instanceof XPath2NodeIterator
927+
? $result
928+
: ( $result >= 1 ? CoreFuncs::$True : CoreFuncs::$False );
926929
}
927930
catch( \Exception $ex )
928931
{
@@ -932,11 +935,14 @@ public static function checkFilings( $findExpression, $fiExpression, $template,
932935
try
933936
{
934937
$result = FunctionUtilities::executeExpression( $fiExpression, $context, $provider, $parameters );
935-
return $result >= 1 ? CoreFuncs::$True : CoreFuncs::$False;
938+
return $result instanceof XPath2NodeIterator
939+
? $result
940+
: ( $result >= 1 ? CoreFuncs::$True : CoreFuncs::$False );
936941
}
937942
catch( \Exception $ex )
938943
{
939-
return CoreFuncs::$False;
944+
return EmptyIterator::$Shared;
945+
// return CoreFuncs::$False;
940946
}
941947

942948
}

0 commit comments

Comments
 (0)