Skip to content

Commit

Permalink
modifier i (PCRE_CASELESS) in Website _beforeSave()
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelson committed Nov 4, 2017
1 parent d5109b7 commit d486cb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/code/Magento/Store/Model/ResourceModel/Website.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function readAllWebsites()
->select()
->from($this->getTable('store_website'));

foreach($this->getConnection()->fetchAll($select) as $websiteData) {
foreach ($this->getConnection()->fetchAll($select) as $websiteData) {
$websites[$websiteData['code']] = $websiteData;
}

Expand All @@ -69,7 +69,7 @@ public function readAllWebsites()
*/
protected function _beforeSave(\Magento\Framework\Model\AbstractModel $object)
{
if (!preg_match('/^[a-z]+[a-z0-9_]*$/', $object->getCode())) {
if (!preg_match('/^[a-z]+[a-z0-9_]*$/i', $object->getCode())) {
throw new \Magento\Framework\Exception\LocalizedException(
__(
'Website code may only contain letters (a-z), numbers (0-9) or underscore (_),'
Expand Down

0 comments on commit d486cb1

Please sign in to comment.