• Resolved joy0114

    (@joy0114)


    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

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Suggestion to developers’ is closed to new replies.