-
Notifications
You must be signed in to change notification settings - Fork 33
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
Fix PHP Deprecation warnings in PHP8+ #1046
base: develop
Are you sure you want to change the base?
Conversation
👍 Here for this. Let's fix these bugs instead of saying the solution is to turn off deprecation notices. |
@@ -498,7 +498,7 @@ function get_key() { | |||
function &add( $id, $properties = array(), $update = false ) { | |||
// Create item | |||
$args = func_get_args(); | |||
$ret = call_user_func_array( array( 'parent', 'add' ), $args ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I resolved this with this code:
$ret = parent::add(...func_get_args());
I was coming to see if it was implemented.. but I guess both ways work. Cheers!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, both seem to work. I don't mind updating my PR to that style.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@archetyped do you have a preference, and are you interested in merging this PR?
PHP 8.1 & 8.2 issue some deprecation notices when using Simple Lightbox.
This fixes those warnings without changing functionality.