• Resolved Scott Farrell

    (@sfarrell5123)


    PHP Fatal error: Uncaught TypeError: unserialize(): Argument #1 ($data) must be of type string, array given in /home/shrimply/public_html/wp-content/plugins/enhanced-e-commerce-for-woocommerce-store/admin/class-tvc-admin-helper.php:425

    when I use php7.4 everything is fine – works great – love your plugin

    but when I go the php 8.0 or 8.1 I get this error

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi there,

    The error is caused by the code in class-tvc-admin-helper.php, it should not unserialize what has been unserialized. All “unserialize” code should be replaced with “maybe_unserialize” or just leave get_option alone.

    For example, lines 422-425:

    
    	public function get_ee_additional_data(){		
    		$this->ee_additional_data = unserialize(get_option('ee_additional_data'));
    		return $this->ee_additional_data;		
    	}
    

    “unserialize(get_option” should replace with “maybe_unserialize(get_option”

    
    	public function get_ee_additional_data(){		
    		$this->ee_additional_data = maybe_unserialize(get_option('ee_additional_data'));
    		return $this->ee_additional_data;		
    	}
    

    You may download the fixes version here https://github.com/nawawi/enhanced-e-commerce-for-woocommerce-store-tweaks

    And please report this issue to the plugin developer.

    Thanks.

    Plugin Author Nawawi Jamili

    (@nawawijamili)

    Hi,

    I’m marking this thread as resolved. Feel free to open a new topic if you have further questions.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘problems with php 8.0 8.1’ is closed to new replies.