onepager
onepager copied to clipboard
Deprecated: array_key_exists(): Using array_key_exists() on objects is deprecated. Use isset() or property_exists() instead
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 Can you submit a PR? i can merge that directly. Thank you