[ad_1]
Replies: 3
Hi,
In order to avoid this kind of errors:
CRITICAL Uncaught TypeError: get_object_vars(): Argument #1 ($object) must be of type object, null given in /all-my-forlders/wp-content/plugins/wordpress-popup/inc/front/hustle-module-front-ajax.php
I have taken the habit of modifying the function module_viewed(), in /inc/front/hustle-module-front-ajax.php, like that:
public function module_viewed() {
$data = json_decode( file_get_contents( 'php://input' ) );
if ($data != NULL) {
$data = get_object_vars( $data );
}
// $data = get_object_vars( $data );
Could this simple check be incorporated into the plugin, please ?
Thanks a lot.
Best regards
