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

Fix PHP Deprecation warnings in PHP8+ #1046

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

mike-healy
Copy link

PHP 8.1 & 8.2 issue some deprecation notices when using Simple Lightbox.
This fixes those warnings without changing functionality.

@bit9labs
Copy link

👍 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 );

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!

Copy link
Author

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.

Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants