Task #5636 » radioProperty-5636.diff

try/catch for exception - Peter Niederlag, 2011-02-03 18:27

View differences:

Classes/ViewHelpers/Form/RadioViewHelper.php
90 90
		$nameAttribute = $this->getName();
91 91
		$valueAttribute = $this->getValue();
92 92
		if ($checked === NULL && $this->isObjectAccessorMode()) {
93
			$propertyValue = $this->getPropertyValue();
94
			// no type-safe comparisation by intention
95
			$checked = $propertyValue == $valueAttribute;
93
			try {
94
				$this->addAdditionalIdentityPropertiesIfNeeded();
95
				$propertyValue = $this->getPropertyValue();
96
				// no type-safe comparisation by intention
97
				$checked = $propertyValue == $valueAttribute;
98
			} catch (Tx_Fluid_Core_ViewHelper_Exception_InvalidVariableException $ex) {
99
				$checked = FALSE;
100
			}
96 101
		}
97 102

  
98 103
		$this->registerFieldNameForFormTokenGeneration($nameAttribute);
(2-2/3)