Skip to content

Commit

Permalink
Removed PHP 5.3 compatibility code from Mage_Adminhtml_Model_System_C…
Browse files Browse the repository at this point in the history
…onfig_Backend_Locale_Timezone (#2563)
  • Loading branch information
fballiano authored Sep 6, 2022
1 parent 0c2fb34 commit a731ed8
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,9 @@
*/
class Mage_Adminhtml_Model_System_Config_Backend_Locale_Timezone extends Mage_Core_Model_Config_Data
{
/**
* Const for PHP 5.3+ compatibility
* This value copied from DateTimeZone::ALL_WITH_BC in PHP 5.3+
*
* @constant ALL_WITH_BC
*/
const ALL_WITH_BC = 4095;

protected function _beforeSave()
{
$allWithBc = self::ALL_WITH_BC;
if (defined('DateTimeZone::ALL_WITH_BC')) {
$allWithBc = DateTimeZone::ALL_WITH_BC;
}

$allWithBc = DateTimeZone::ALL_WITH_BC;
if (!in_array($this->getValue(), DateTimeZone::listIdentifiers($allWithBc))) {
Mage::throwException(Mage::helper('adminhtml')->__('Invalid timezone'));
}
Expand Down

0 comments on commit a731ed8

Please sign in to comment.