Skip to content

Commit 42fbd00

Browse files
authored
Merge pull request #198 from phpcr/fix-deprecated-exception-argument
passing null instead of 0 is deprecated in php 8.1
2 parents fc8546e + fa113bf commit 42fbd00

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

inc/AbstractLoader.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ private function getSessionForWorkspace($credentials, $workspaceName)
290290
$workspace = $session->getWorkspace();
291291

292292
if (in_array($workspaceName, $workspace->getAccessibleWorkspaceNames())) {
293-
throw new Exception(sprintf('Workspace "%s" already exists but could not login to it', $workspaceName), null, $e);
293+
throw new Exception(sprintf('Workspace "%s" already exists but could not login to it', $workspaceName), 0, $e);
294294
}
295295
$workspace->createWorkspace($workspaceName);
296296

tests/Query/QOM/QomTestQueries.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,9 @@ public static function getQueries(QueryObjectModelFactoryInterface $factory)
442442
$factory->createQuery(
443443
$factory->selector('file', 'nt:file'),
444444
$factory->sameNode('file', '/home node'),
445-
array(),
446-
array());
445+
[],
446+
[]
447+
);
447448

448449
/*
449450
* 6.7.21. ChildNode

0 commit comments

Comments
 (0)