Skip to content

Commit

Permalink
Fixed PHP 8.4 warns
Browse files Browse the repository at this point in the history
  • Loading branch information
tltneon committed Dec 26, 2024
1 parent 586f2dc commit dfc6238
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lgsl_language.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Lang {
const TR = "turkish";
private string $lang;
private array $strings;
function __construct(string $lang = null) {
function __construct(?string $lang = null) {
global $lgsl_config;
if (!$lang) {
if (isset($lgsl_config['language'])) {
Expand Down
2 changes: 1 addition & 1 deletion src/lgsl_protocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -3036,7 +3036,7 @@ public function pos(string $string) {
public function length(): int {
return strlen($this->_string);
}
public function skip(int $left, int $right = null): void {
public function skip(int $left, ?int $right = null): void {
if ($right) {
$this->set(substr($this->_string, $left, -$right));
} else {
Expand Down

0 comments on commit dfc6238

Please sign in to comment.