Skip to content

Commit

Permalink
Prevent errors when customer does not have a created at timestamp. (#923
Browse files Browse the repository at this point in the history
) (#980)
  • Loading branch information
colinmollenhour authored Jun 4, 2020
1 parent d631b10 commit b84cd28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,18 @@ public function getCustomerLog()
*/
public function getCreateDate()
{
if ( ! $this->getCustomer()->getCreatedAt()) {
return null;
}
return $this->_getCoreHelper()->formatDate($this->getCustomer()->getCreatedAt(),
Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true);
}

public function getStoreCreateDate()
{
if ( ! $this->getCustomer()->getCreatedAt()) {
return null;
}
$date = Mage::app()->getLocale()->storeDate(
$this->getCustomer()->getStoreId(),
$this->getCustomer()->getCreatedAtTimestamp(),
Expand Down

0 comments on commit b84cd28

Please sign in to comment.