Undefined property error after login with Twitter

Output:

Notice: Undefined property: stdClass::$value in /home/m/moszamte/msk-baby.ru/public_html/catalog/controller/module/oneall.php on line 1633Notice: Undefined property: stdClass::$value in /home/m/moszamte/msk-baby.ru/public_html/catalog/controller/module/oneall.php on line 1637Notice: Undefined property: stdClass::$value in /home/m/moszamte/msk-baby.ru/public_html/catalog/controller/module/oneall.php on line 1644Warning: Cannot modify header information - headers already sent by (output started at /home/m/moszamte/msk-baby.ru/public_html/index.php:106) in /home/m/moszamte/msk-baby.ru/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home/m/moszamte/msk-baby.ru/public_html/index.php:106) in /home/m/moszamte/msk-baby.ru/public_html/vqmod/vqcache/vq2-system_engine_controller.php on line 29

When I register on twitter, I use my phone number, not email. So, when I tryed to login with Twitter, I will see this error.
OpenCart plugin for 1.5

Answers

  • The problem is in this peace of code:

    foreach ($identity->emails as $email) { // Add to simple list. $data ['user_emails_simple'] [] = $email->value; // Add to list. $data ['user_emails'] [] = array( 'user_email' => $email->value, 'user_email_is_verified' => $email->is_verified ); // Keep one, if possible a verified one. if (empty ($data ['user_email']) || $email->is_verified) { $data ['user_email'] = $email->value; $data ['user_email_is_verified'] = $email->is_verified; } }

  • I solve this by adding this code:
    if (!property_exists ($email, 'value')){ $email->value = $this->generate_random_email(); }
Sign In or Register to comment.