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 @@ -53,7 +53,7 @@ public function readAllWebsites()
5353 ->select ()
5454 ->from ($ this ->getTable ('store_website ' ));
5555
56- foreach ($ this ->getConnection ()->fetchAll ($ select ) as $ websiteData ) {
56+ foreach ($ this ->getConnection ()->fetchAll ($ select ) as $ websiteData ) {
5757 $ websites [$ websiteData ['code ' ]] = $ websiteData ;
5858 }
5959
@@ -69,7 +69,7 @@ public function readAllWebsites()
6969 */
7070 protected function _beforeSave (\Magento \Framework \Model \AbstractModel $ object )
7171 {
72- if (!preg_match ('/^[a-z]+[a-z0-9_]*$/ ' , $ object ->getCode ())) {
72+ if (!preg_match ('/^[a-z]+[a-z0-9_]*$/i ' , $ object ->getCode ())) {
7373 throw new \Magento \Framework \Exception \LocalizedException (
7474 __ (
7575 '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
@@ -463,7 +463,7 @@ protected function _getValidationRulesBeforeSave()
463463 $ storeLabelRule ->setMessage (__ ('Name is required ' ), \Zend_Validate_NotEmpty::IS_EMPTY );
464464 $ validator ->addRule ($ storeLabelRule , 'name ' );
465465
466- $ storeCodeRule = new \Zend_Validate_Regex ('/^[a-z]+[a-z0-9_]*$/ ' );
466+ $ storeCodeRule = new \Zend_Validate_Regex ('/^[a-z]+[a-z0-9_]*$/i ' );
467467 $ storeCodeRule ->setMessage (
468468 __ (
469469 '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