TYPE_BOOL now works on "false" and "true"
authorMagnus Kühn <magnus.khn@gmail.com>
Sat, 29 Dec 2012 10:27:09 +0000 (11:27 +0100)
committerMagnus Kühn <magnus.khn@gmail.com>
Sat, 29 Dec 2012 10:27:09 +0000 (11:27 +0100)
wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php

index a2b398a2852d0365ad28990870919be041c74771..200af0fc157e0b41397ff8b02ea2f6c06779b947 100644 (file)
@@ -465,7 +465,11 @@ abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction, ID
                                        }
                                }
                                else {
-                                       $target[$variableName] = (bool) $target[$variableName];
+                                       if (is_string($target[$variableName])) {
+                                               $target[$variableName] = $target[$variableName] != 'false';
+                                       } else {
+                                               $target[$variableName] = (bool) $target[$variableName];
+                                       }
                                }
                        break;
                }