Author: sevein
Date: Mon Aug 13 19:54:56 2012
New Revision: 12091
Log:
Add extra check to make sure that the property exists, so render_field can be
used now with form properties created on-the-fly, not only against entity
properties. Fixes issue 2198.
Modified:
trunk/lib/helper/QubitHelper.php
Modified: trunk/lib/helper/QubitHelper.php
==============================================================================
--- trunk/lib/helper/QubitHelper.php Mon Aug 13 19:11:45 2012 (r12090)
+++ trunk/lib/helper/QubitHelper.php Mon Aug 13 19:54:56 2012 (r12091)
@@ -37,7 +37,11 @@
$div = null;
$culture = sfContext::getInstance()->user->getCulture();
- if (isset($resource) && $culture != $resource->sourceCulture && 0 <
strlen($source = $resource->__get($options['name'], array('sourceCulture' =>
true))))
+
+ if (isset($resource)
+ && property_exists($resource, $options['name'])
+ && $culture != $resource->sourceCulture
+ && 0 < strlen($source = $resource->__get($options['name'],
array('sourceCulture' => true))))
{
// TODO Are there cases where the direction of this <div/>'s containing
// block isn't the direction of the current culture?
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.