@@ -343,27 +343,27 @@ private function parseStar(int $line): iQuad {
343
343
if (0 === (int ) $ ret ) {
344
344
throw new RdfIoException ("Failed parsing predicate on line $ line with error ' " . preg_last_error_msg () . "': " . substr ($ this ->line , $ this ->offset ));
345
345
}
346
- $ this ->offset += strlen ($ matches [0 ]);
347
- $ pred = $ this ->dataFactory ::namedNode ($ matches [1 ]);
346
+ $ this ->offset += strlen (( string ) $ matches [0 ]);
347
+ $ pred = $ this ->dataFactory ::namedNode (( string ) $ matches [1 ]);
348
348
} else {
349
349
$ ret = preg_match ($ this ->regexpSbjPred , $ this ->line , $ matches , PREG_UNMATCHED_AS_NULL , $ this ->offset );
350
350
if (0 === (int ) $ ret ) {
351
351
throw new RdfIoException ("Failed parsing subject and predicate on line $ line with error ' " . preg_last_error_msg () . "': " . substr ($ this ->line , $ this ->offset ));
352
352
}
353
- $ this ->offset += strlen ($ matches [0 ]);
353
+ $ this ->offset += strlen (( string ) $ matches [0 ]);
354
354
if ($ matches [1 ] !== null ) {
355
355
$ sbj = $ this ->dataFactory ::namedNode ($ this ->unescape ($ matches [1 ]));
356
356
} else {
357
357
$ sbj = $ this ->dataFactory ::blankNode ($ matches [2 ]);
358
358
}
359
- $ pred = $ this ->dataFactory ::namedNode ($ matches [3 ]);
359
+ $ pred = $ this ->dataFactory ::namedNode (( string ) $ matches [3 ]);
360
360
}
361
361
if (preg_match (self ::STAR_START , $ this ->line , $ matches , 0 , $ this ->offset )) {
362
362
$ this ->offset += strlen ($ matches [0 ]);
363
363
$ this ->level ++;
364
364
$ obj = $ this ->parseStar ($ line );
365
365
$ ret = preg_match ($ this ->regexpGraph , $ this ->line , $ matches , PREG_UNMATCHED_AS_NULL , $ this ->offset );
366
- $ this ->offset += strlen ($ matches [0 ]);
366
+ $ this ->offset += strlen (( string ) $ matches [0 ]);
367
367
if (($ matches [1 ] ?? null ) !== null ) {
368
368
$ graph = $ this ->dataFactory ::namedNode ($ matches [1 ]);
369
369
} else if (($ matches [2 ] ?? null ) !== null ) {
@@ -374,7 +374,7 @@ private function parseStar(int $line): iQuad {
374
374
if (0 === $ ret ) {
375
375
throw new RdfIoException ("Can't parse object on line $ line with error ' " . preg_last_error_msg () . "': " . substr ($ this ->line , $ this ->offset ));
376
376
}
377
- $ this ->offset += strlen ($ matches [0 ]);
377
+ $ this ->offset += strlen (( string ) $ matches [0 ]);
378
378
if ($ matches [1 ] !== null ) {
379
379
$ obj = $ this ->dataFactory ::namedNode ($ matches [1 ]);
380
380
} elseif ($ matches [2 ] !== null ) {
0 commit comments