This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree 2 files changed +5
-5
lines changed
app/code/Magento/Store/Model
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ public function readAllWebsites()
53
53
->select ()
54
54
->from ($ this ->getTable ('store_website ' ));
55
55
56
- foreach ($ this ->getConnection ()->fetchAll ($ select ) as $ websiteData ) {
56
+ foreach ($ this ->getConnection ()->fetchAll ($ select ) as $ websiteData ) {
57
57
$ websites [$ websiteData ['code ' ]] = $ websiteData ;
58
58
}
59
59
@@ -69,7 +69,7 @@ public function readAllWebsites()
69
69
*/
70
70
protected function _beforeSave (\Magento \Framework \Model \AbstractModel $ object )
71
71
{
72
- if (!preg_match ('/^[a-z]+[a-z0-9_]*$/ ' , $ object ->getCode ())) {
72
+ if (!preg_match ('/^[a-z]+[a-z0-9_]*$/i ' , $ object ->getCode ())) {
73
73
throw new \Magento \Framework \Exception \LocalizedException (
74
74
__ (
75
75
'Website code may only contain letters (a-z), numbers (0-9) or underscore (_), '
Original file line number Diff line number Diff line change 12
12
use Magento \Framework \App \Http \Context ;
13
13
use Magento \Framework \App \ObjectManager ;
14
14
use Magento \Framework \App \ScopeInterface as AppScopeInterface ;
15
- use Magento \Framework \Filesystem ;
16
15
use Magento \Framework \DataObject \IdentityInterface ;
17
- use Magento \Framework \Url \ ScopeInterface as UrlScopeInterface ;
16
+ use Magento \Framework \Filesystem ;
18
17
use Magento \Framework \Model \AbstractExtensibleModel ;
18
+ use Magento \Framework \Url \ScopeInterface as UrlScopeInterface ;
19
19
use Magento \Framework \UrlInterface ;
20
20
use Magento \Store \Api \Data \StoreInterface ;
21
21
@@ -463,7 +463,7 @@ protected function _getValidationRulesBeforeSave()
463
463
$ storeLabelRule ->setMessage (__ ('Name is required ' ), \Zend_Validate_NotEmpty::IS_EMPTY );
464
464
$ validator ->addRule ($ storeLabelRule , 'name ' );
465
465
466
- $ storeCodeRule = new \Zend_Validate_Regex ('/^[a-z]+[a-z0-9_]*$/ ' );
466
+ $ storeCodeRule = new \Zend_Validate_Regex ('/^[a-z]+[a-z0-9_]*$/i ' );
467
467
$ storeCodeRule ->setMessage (
468
468
__ (
469
469
'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