Skip to content

Commit

Permalink
fix: downgraded dynamic constant access for php<8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
RiedleroD committed Sep 30, 2024
1 parent 028b1fd commit 0262cc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lbplanner/classes/enums/CAPABILITY.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ class CAPABILITY extends Enum {
*/
public static function to_capability(string $str): int {
$name = self::name_from($str);
return CAPABILITY_FLAG::{$name};
return constant('CAPABILITY_FLAG::'.$name);
}
}
2 changes: 1 addition & 1 deletion lbplanner/classes/enums/CAPABILITY_FLAG.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ class CAPABILITY_FLAG extends Enum {
*/
public static function to_capability(int $num): string {
$name = self::name_from($num);
return CAPABILITY::{$name};
return constant('CAPABILITY::'.$name);
}
}

0 comments on commit 0262cc8

Please sign in to comment.