Skip to content

Commit dcc1fe5

Browse files
committed
Merge branch 'php-8.1/fix-deprecation-notice' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents ed08850 + a330bf2 commit dcc1fe5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Ruleset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ private function expandRulesetReference($ref, $rulesetDir, $depth=0)
726726
} else {
727727
// See if this is a whole standard being referenced.
728728
$path = Util\Standards::getInstalledStandardPath($ref);
729-
if (Util\Common::isPharFile($path) === true && strpos($path, 'ruleset.xml') === false) {
729+
if ($path !== null && Util\Common::isPharFile($path) === true && strpos($path, 'ruleset.xml') === false) {
730730
// If the ruleset exists inside the phar file, use it.
731731
if (file_exists($path.DIRECTORY_SEPARATOR.'ruleset.xml') === true) {
732732
$path .= DIRECTORY_SEPARATOR.'ruleset.xml';

0 commit comments

Comments
 (0)