File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
app/code/Magento/Store/Model Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public function readAllWebsites()
4747 ->select ()
4848 ->from ($ this ->getTable ('store_website ' ));
4949
50- foreach ($ this ->getConnection ()->fetchAll ($ select ) as $ websiteData ) {
50+ foreach ($ this ->getConnection ()->fetchAll ($ select ) as $ websiteData ) {
5151 $ websites [$ websiteData ['code ' ]] = $ websiteData ;
5252 }
5353
@@ -63,7 +63,7 @@ public function readAllWebsites()
6363 */
6464 protected function _beforeSave (\Magento \Framework \Model \AbstractModel $ object )
6565 {
66- if (!preg_match ('/^[a-z]+[a-z0-9_]*$/ ' , $ object ->getCode ())) {
66+ if (!preg_match ('/^[a-z]+[a-z0-9_]*$/i ' , $ object ->getCode ())) {
6767 throw new \Magento \Framework \Exception \LocalizedException (
6868 __ (
6969 'Website code may only contain letters (a-z), numbers (0-9) or underscore (_), '
Original file line number Diff line number Diff line change 1212use Magento \Framework \App \Http \Context ;
1313use Magento \Framework \App \ObjectManager ;
1414use Magento \Framework \App \ScopeInterface as AppScopeInterface ;
15- use Magento \Framework \Filesystem ;
1615use Magento \Framework \DataObject \IdentityInterface ;
17- use Magento \Framework \Url \ ScopeInterface as UrlScopeInterface ;
16+ use Magento \Framework \Filesystem ;
1817use Magento \Framework \Model \AbstractExtensibleModel ;
18+ use Magento \Framework \Url \ScopeInterface as UrlScopeInterface ;
1919use Magento \Framework \UrlInterface ;
2020use Magento \Store \Api \Data \StoreInterface ;
2121
@@ -459,7 +459,7 @@ protected function _getValidationRulesBeforeSave()
459459 $ storeLabelRule ->setMessage (__ ('Name is required ' ), \Zend_Validate_NotEmpty::IS_EMPTY );
460460 $ validator ->addRule ($ storeLabelRule , 'name ' );
461461
462- $ storeCodeRule = new \Zend_Validate_Regex ('/^[a-z]+[a-z0-9_]*$/ ' );
462+ $ storeCodeRule = new \Zend_Validate_Regex ('/^[a-z]+[a-z0-9_]*$/i ' );
463463 $ storeCodeRule ->setMessage (
464464 __ (
465465 'The store code may contain only letters (a-z), numbers (0-9) or underscore (_), '
You can’t perform that action at this time.
0 commit comments