[limb-svn] r6802 - 3.x/trunk/limb/wact/src/components/form
svn at limb-project.com
svn at limb-project.com
Tue Feb 19 00:05:10 MSK 2008
Author: 3dmax
Date: 2008-02-19 00:05:10 +0300 (Tue, 19 Feb 2008)
New Revision: 6802
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6802
Modified:
3.x/trunk/limb/wact/src/components/form/WactFormComponent.class.php
3.x/trunk/limb/wact/src/components/form/error.inc.php
Log:
-- minor fix: PHP < 5.2 doesn't work with ArrayAccess correctly
Modified: 3.x/trunk/limb/wact/src/components/form/WactFormComponent.class.php
===================================================================
--- 3.x/trunk/limb/wact/src/components/form/WactFormComponent.class.php 2008-02-17 18:27:54 UTC (rev 6801)
+++ 3.x/trunk/limb/wact/src/components/form/WactFormComponent.class.php 2008-02-18 21:05:10 UTC (rev 6802)
@@ -105,7 +105,8 @@
// Find the component(s) that the error applies to and tell
// them there was an error (using their setError() method)
// as well as notifying related label components if found
- foreach ($Error['fields'] as $fieldName)
+ $error_fields = $Error['fields'];
+ foreach ($error_fields as $fieldName)
{
$Field = $this->findChild($fieldName);
if (is_object($Field))
Modified: 3.x/trunk/limb/wact/src/components/form/error.inc.php
===================================================================
--- 3.x/trunk/limb/wact/src/components/form/error.inc.php 2008-02-17 18:27:54 UTC (rev 6801)
+++ 3.x/trunk/limb/wact/src/components/form/error.inc.php 2008-02-18 21:05:10 UTC (rev 6802)
@@ -2,9 +2,9 @@
/*
* Limb PHP Framework
*
- * @link http://limb-project.com
+ * @link http://limb-project.com
* @copyright Copyright © 2004-2007 BIT(http://bit-creative.com)
- * @license LGPL http://www.gnu.org/copyleft/lesser.html
+ * @license LGPL http://www.gnu.org/copyleft/lesser.html
*/
/**
@@ -77,14 +77,16 @@
$error = parent :: current();
$text = $error['message'];
-
- foreach($error['fields'] as $key => $fieldName)
+
+ $error_fields = $error['fields'];
+ foreach($error_fields as $key => $fieldName)
{
$replacement = '"' . $this->getFieldName($fieldName) . '"';
$text = str_replace('{' . $key . '}', $replacement, $text);
}
- foreach($error['values'] as $key => $replacement)
+ $error_values = $error['values'];
+ foreach($error_values as $key => $replacement)
$text = str_replace('{' . $key . '}', $replacement, $text);
$error['message'] = $text;
More information about the limb-svn
mailing list