View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001518 | OXID eShop (all versions) | 4. ------ eShop Core ------- | public | 2009-12-02 17:36 | 2012-12-10 13:42 |
| Reporter | d3 | Assigned To | |||
| Priority | high | Severity | major | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Product Version | 4.2.0 revision 23610 | ||||
| Fixed in Version | 4.3.0 revision 26948 | ||||
| Summary | 0001518: saveShopConfVar dont allows "0" | ||||
| Description | in 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. | ||||
| Tags | No tags attached. | ||||
| Theme | |||||
| Browser | All | ||||
| PHP Version | any | ||||
| Database Version | any | ||||
|
|
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. |
|
|
It has been also decided to support "0" internally in case 'bool' value is intended to be written. |