1
0
Fork 0

[PHP 8.4] Fix for implicit nullability deprecation (#11888)

Fixes a issue that emits a deprecation notice on PHP 8.4.

See:
 - [RFC](https://wiki.php.net/rfc/deprecate-implicitly-nullable-types)
 - [PHP 8.4: Implicitly nullable parameter declarations deprecated](https://php.watch/versions/8.4/implicitly-marking-parameter-type-nullable-deprecated)
pull/11892/head
Ayesh Karunaratne 2024-03-15 19:55:25 +07:00 committed by GitHub
parent 5a20dba768
commit 62126e1a40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -298,7 +298,7 @@ class Git
return true; return true;
} }
public function fetchRefOrSyncMirror(string $url, string $dir, string $ref, string $prettyVersion = null): bool public function fetchRefOrSyncMirror(string $url, string $dir, string $ref, ?string $prettyVersion = null): bool
{ {
if ($this->checkRefIsInMirror($dir, $ref)) { if ($this->checkRefIsInMirror($dir, $ref)) {
if (Preg::isMatch('{^[a-f0-9]{40}$}', $ref) && $prettyVersion !== null) { if (Preg::isMatch('{^[a-f0-9]{40}$}', $ref) && $prettyVersion !== null) {