Closed DavaGordon closed 5 years ago
During magneto 2.3.2 compilation the following error occured
Parse error: syntax error, unexpected '$result' (T_VARIABLE) inl/vendor/klaviyo/magento2-extension/Plugin/Customer/Model/CustomerData.php on line 38;
after reviewing the code it was found you were missing the semicolon from end of variables but can i suggest you rewrite from
public function afterGetSectionData(Customer $subject, $result) { if ($this->currentCustomer->getCustomerId()) { $result['lastname'] = $this->currentCustomer->getCustomer()->getLastname() $result['email'] = $this->currentCustomer->getCustomer()->getEmail() } else { $result['lastname'] = ''; $result['email'] = ''; } return $result; }
To
public function afterGetSectionData(Customer $subject, $result) { $result['lastname'] = ''; $result['email'] = ''; if ($this->currentCustomer->getCustomerId()) { $result['lastname'] = $this->currentCustomer->getCustomer()->getLastname(); $result['email'] = $this->currentCustomer->getCustomer()->getEmail(); } return $result; }
@DavaGordon merged in dev-master will update package later today
During magneto 2.3.2 compilation the following error occured
Parse error: syntax error, unexpected '$result' (T_VARIABLE) inl/vendor/klaviyo/magento2-extension/Plugin/Customer/Model/CustomerData.php on line 38;
after reviewing the code it was found you were missing the semicolon from end of variables but can i suggest you rewrite from
To