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

Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead #156

Open
anamwp opened this issue Nov 25, 2020 · 1 comment

Comments

@anamwp
Copy link
Contributor

anamwp commented Nov 25, 2020

array_key_exists() is deprecated in php 7.4 it give error on collection page (src > onepager > block > collection.php on line 5).
Use that function as below.

public function get( $key ) {
		$new_arr = json_decode(json_encode($this), true);
		return array_key_exists(  $key, $new_arr ) ? $this[ $key ] : null;
	} 
@shamsbd71
Copy link
Member

@anamwp Can you submit a PR? i can merge that directly.
Thank you

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

No branches or pull requests

2 participants