File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
app/code/Magento/Store/Model Expand file tree Collapse file tree 2 files changed +4
-4
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 @@ -463,10 +463,10 @@ 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-zA-Z ]+[a-z0-9_]*$/ ' );
466+ $ storeCodeRule = new \Zend_Validate_Regex ('/^[a-z ]+[a-z0-9_]*$/i ' );
467467 $ storeCodeRule ->setMessage (
468468 __ (
469- 'The store code may contain only letters (a-zA-Z ), numbers (0-9) or underscore (_), '
469+ 'The store code may contain only letters (a-z ), numbers (0-9) or underscore (_), '
470470 . ' and the first character must be a letter. '
471471 ),
472472 \Zend_Validate_Regex::NOT_MATCH
You can’t perform that action at this time.
0 commit comments