Skip to content

Commit

Permalink
Resource::castLiteral(): casting xsd:boolean fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
zozlak committed Dec 4, 2024
1 parent 2280822 commit fe66c3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/acdhOeaw/arche/doorkeeper/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ private function castLiteral(LiteralInterface $l, string $range): LiteralInterfa
$value = DF::literal($numValue, null, $range);
break;
case RDF::XSD_BOOLEAN:
$value = DF::literal((string) ((bool) $l), null, $range);
$value = DF::literal(in_array((string) $l, ['', '0', 'false']) ? 'false' : 'true', null, $range);
break;
default:
throw new RuntimeException('unknown range data type: ' . $range);
Expand Down

0 comments on commit fe66c3d

Please sign in to comment.