View Issue Details

IDProjectCategoryView StatusLast Update
0001518OXID eShop (all versions)4. ------ eShop Core -------public2012-12-10 13:42
Reporterd3 Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.2.0 revision 23610 
Fixed in Version4.3.0 revision 26948 
Summary0001518: saveShopConfVar dont allows "0"
Descriptionin oxconfig::saveShopConfVar() you have a new switch with any type cases.
For type 'bool' you can use as value 1, but not 0 !!
-->
case 'bool':
 $sValue = $sVarVal = ( $sVarVal == 'true' || $sVarVal == '1' );
break;

If you try
$this->getConfig()->saveShopConfVar('bool', 'varname', 0); the shop saves "1" in oxconfig table!
Sure you can use false/true. But 1/0 should also work because of compatiblity.
TagsNo tags attached.
Theme
BrowserAll
PHP Versionany
Database Versionany

Activities

tomas_liubinas

2009-12-02 18:17

reporter   ~0002154

The specific thing is saveShopConfVar() accepts only 2 values for bool vars. It is 'true' or 'false' (literally). The rest might work due to string cast, but you should use only those 2 possible. Additionally I added some notes to function documentation.

tomas_liubinas

2009-12-02 19:15

reporter   ~0002155

It has been also decided to support "0" internally in case 'bool' value is intended to be written.