located in "./admin/includes/application_top.php"
line 121:
$loaderPrefix = preg_replace('/[a-z_]^/', '', $loaderPrefix);
what does this pattern "/[a-z_]^/" means?
spell mistake?
located in "./admin/includes/application_top.php"
line 121:
$loaderPrefix = preg_replace('/[a-z_]^/', '', $loaderPrefix);
what does this pattern "/[a-z_]^/" means?
spell mistake?
No, that's not an error. It's very specific.
It's stripping invalid characters from the passed parameter.
More information on regex: http://www.regular-expressions.info/reference.html
and the PHP preg_replace() function: http://www.php.net/manual/en/function.preg-replace.php
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
/[a-z_]^/ this caret means what? thanks
In that case, the caret is a negation operator. So, that preg_replace statement replaces any characters not matching a-z or underscore with blanks, effectively removing bad characters.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
var_dump(preg_match('/[a-z_]^/',"A"))
result is false
Are you running into a particular problem with your store?
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.