Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug with php 8.0 and server crash #37

Closed
efor89 opened this issue Oct 17, 2021 · 1 comment
Closed

bug with php 8.0 and server crash #37

efor89 opened this issue Oct 17, 2021 · 1 comment
Assignees

Comments

@efor89
Copy link

efor89 commented Oct 17, 2021

hi with php 8.0 i become this error and the server crash!

ErrorException: "uasort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero" (EXCEPTION) in "plugins/PiggyAuctions/src/DaPigGuy/PiggyAuctions/menu/utils/MenuUtils" at line 28.

@efor89 efor89 changed the title bug with php 8.0 bug with php 8.0 and server crash Oct 19, 2021
@efor89
Copy link
Author

efor89 commented Oct 25, 2021

it woks now with this

$sortFunction = static function (Auction $a, Auction $b): int {
return $b->getEndDate() <=> $a->getEndDate();
} ?? $sortFunction;
uasort( $auctions, $sortFunction);

@efor89 efor89 closed this as completed Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants