WordPress.org

Ready to get started?Download WordPress

Forums

MarketPress - WordPress eCommerce
[resolved] Warning: Illegal string offset 'email' (2 posts)

  1. waila7
    Member
    Posted 1 year ago #

    Hey there,

    In backend as an admin user I created a new user.
    I have an issue after editing a new user in wordpress backend, Users > Edit user;

    It throws warnings:

    Warning: Illegal string offset 'email' in C:\xampp\htdocs\marmozel\wp-content\plugins\wordpress-ecommerce\marketpress.php on line 3376
    
    Warning: Illegal string offset 'name' in C:\xampp\htdocs\marmozel\wp-content\plugins\wordpress-ecommerce\marketpress.php on line 3377
    
    Warning: Illegal string offset 'address1' in C:\xampp\htdocs\marmozel\wp-content\plugins\wordpress-ecommerce\marketpress.php on line 3378
    
    Warning: Illegal string offset 'address2' in C:\xampp\htdocs\marmozel\wp-content\plugins\wordpress-ecommerce\marketpress.php on line 3379
    
    Warning: Illegal string offset 'city' in C:\xampp\htdocs\marmozel\wp-content\plugins\wordpress-ecommerce\marketpress.php on line 3380
    
    Warning: Illegal string offset 'state' in C:\xampp\htdocs\marmozel\wp-content\plugins\wordpress-ecommerce\marketpress.php on line 3381
    
    Warning: Illegal string offset 'zip' in C:\xampp\htdocs\marmozel\wp-content\plugins\wordpress-ecommerce\marketpress.php on line 3382
    
    Warning: Illegal string offset 'country' in C:\xampp\htdocs\marmozel\wp-content\plugins\wordpress-ecommerce\marketpress.php on line 3383
    
    Warning: Illegal string offset 'phone' in C:\xampp\htdocs\marmozel\wp-content\plugins\wordpress-ecommerce\marketpress.php on line 3386

    Any ideas solving it?

    WordPress version 3.4.2 (Multisite)
    MarketPress 2.5.1

    http://wordpress.org/extend/plugins/wordpress-ecommerce/

  2. waila7
    Member
    Posted 1 year ago #

    After creating a new user it seems variable's $mail value doesn't exist;

    Code in marketpress.php:
    $email = (!empty($_SESSION['mp_billing_info']['email'])) ? $_SESSION['mp_billing_info']['email'] : $meta['email'];

    So there is a need to assign it. I rewrite above line as this:

    if (!empty($_SESSION['mp_billing_info']['email'])) {
            $email = $_SESSION['mp_billing_info']['email'];
        } else {
            if (!empty($meta['email'])) {
                $email = $meta['email'];
            } else {
                $email = '';
            }
        }

    we need to take care for $name, $address1, $address2, $city, $state, $zip, $country as well.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic