onepager icon indicating copy to clipboard operation
onepager copied to clipboard

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

Open anamwp opened this issue 4 years ago • 1 comments

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;
	} 

anamwp avatar Nov 25 '20 06:11 anamwp

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

shamsbd71 avatar Nov 26 '20 14:11 shamsbd71