Author: fabien
Date: 2010-05-19 13:47:56 +0200 (Wed, 19 May 2010)
New Revision: 29521
Modified:
branches/1.3/lib/util/sfDomCssSelector.class.php
branches/1.3/lib/util/sfNamespacedParameterHolder.class.php
branches/1.3/lib/view/sfViewCacheManager.class.php
branches/1.3/test/unit/i18n/sfMessageSource_XLIFFTest.php
branches/1.4/lib/util/sfDomCssSelector.class.php
branches/1.4/lib/util/sfNamespacedParameterHolder.class.php
branches/1.4/lib/view/sfViewCacheManager.class.php
branches/1.4/test/unit/i18n/sfMessageSource_XLIFFTest.php
Log:
[1.3, 1.4] fixed E_STRICT compatbility of some unit tests (closes #8522)
Modified: branches/1.3/lib/util/sfDomCssSelector.class.php
===================================================================
--- branches/1.3/lib/util/sfDomCssSelector.class.php 2010-05-19 11:47:08 UTC
(rev 29520)
+++ branches/1.3/lib/util/sfDomCssSelector.class.php 2010-05-19 11:47:56 UTC
(rev 29521)
@@ -198,7 +198,7 @@
{
$attrName = $match[1];
$attrOperator = $match[2];
- $attrValue = $match[4] === '' ? $match[5] : $match[4];
+ $attrValue = $match[4] === '' ? (isset($match[5]) ? $match[5] :
'') : $match[4];
switch ($attrOperator)
{
Modified: branches/1.3/lib/util/sfNamespacedParameterHolder.class.php
===================================================================
--- branches/1.3/lib/util/sfNamespacedParameterHolder.class.php 2010-05-19
11:47:08 UTC (rev 29520)
+++ branches/1.3/lib/util/sfNamespacedParameterHolder.class.php 2010-05-19
11:47:56 UTC (rev 29521)
@@ -52,8 +52,10 @@
{
if ($move)
{
- $values = $this->removeNamespace();
- $this->addByRef($values, $namespace);
+ if (null !== $values = $this->removeNamespace())
+ {
+ $this->addByRef($values, $namespace);
+ }
}
$this->default_namespace = $namespace;
Modified: branches/1.3/lib/view/sfViewCacheManager.class.php
===================================================================
--- branches/1.3/lib/view/sfViewCacheManager.class.php 2010-05-19 11:47:08 UTC
(rev 29520)
+++ branches/1.3/lib/view/sfViewCacheManager.class.php 2010-05-19 11:47:56 UTC
(rev 29521)
@@ -385,6 +385,11 @@
{
list($route_name, $params) =
$this->controller->convertUrlStringToParameters($internalUri);
+ if (!isset($params['module']))
+ {
+ return $defaultValue;
+ }
+
$this->registerConfiguration($params['module']);
$value = $defaultValue;
Modified: branches/1.3/test/unit/i18n/sfMessageSource_XLIFFTest.php
===================================================================
--- branches/1.3/test/unit/i18n/sfMessageSource_XLIFFTest.php 2010-05-19
11:47:08 UTC (rev 29520)
+++ branches/1.3/test/unit/i18n/sfMessageSource_XLIFFTest.php 2010-05-19
11:47:56 UTC (rev 29521)
@@ -19,7 +19,6 @@
// copy fixtures to tmp directory
copy(dirname(__FILE__).'/fixtures/messages.fr.xml', $temp.'/messages.fr.xml');
-copy(dirname(__FILE__).'/fixtures/invalid.xml', $temp.'/invalid.xml');
$source = sfMessageSource::factory('XLIFF', $temp);
$source->setCulture('fr_FR');
Modified: branches/1.4/lib/util/sfDomCssSelector.class.php
===================================================================
--- branches/1.4/lib/util/sfDomCssSelector.class.php 2010-05-19 11:47:08 UTC
(rev 29520)
+++ branches/1.4/lib/util/sfDomCssSelector.class.php 2010-05-19 11:47:56 UTC
(rev 29521)
@@ -185,7 +185,7 @@
{
$attrName = $match[1];
$attrOperator = $match[2];
- $attrValue = $match[4] === '' ? $match[5] : $match[4];
+ $attrValue = $match[4] === '' ? (isset($match[5]) ? $match[5] :
'') : $match[4];
switch ($attrOperator)
{
Modified: branches/1.4/lib/util/sfNamespacedParameterHolder.class.php
===================================================================
--- branches/1.4/lib/util/sfNamespacedParameterHolder.class.php 2010-05-19
11:47:08 UTC (rev 29520)
+++ branches/1.4/lib/util/sfNamespacedParameterHolder.class.php 2010-05-19
11:47:56 UTC (rev 29521)
@@ -52,8 +52,10 @@
{
if ($move)
{
- $values = $this->removeNamespace();
- $this->addByRef($values, $namespace);
+ if (null !== $values = $this->removeNamespace())
+ {
+ $this->addByRef($values, $namespace);
+ }
}
$this->default_namespace = $namespace;
Modified: branches/1.4/lib/view/sfViewCacheManager.class.php
===================================================================
--- branches/1.4/lib/view/sfViewCacheManager.class.php 2010-05-19 11:47:08 UTC
(rev 29520)
+++ branches/1.4/lib/view/sfViewCacheManager.class.php 2010-05-19 11:47:56 UTC
(rev 29521)
@@ -385,6 +385,11 @@
{
list($route_name, $params) =
$this->controller->convertUrlStringToParameters($internalUri);
+ if (!isset($params['module']))
+ {
+ return $defaultValue;
+ }
+
$this->registerConfiguration($params['module']);
$value = $defaultValue;
Modified: branches/1.4/test/unit/i18n/sfMessageSource_XLIFFTest.php
===================================================================
--- branches/1.4/test/unit/i18n/sfMessageSource_XLIFFTest.php 2010-05-19
11:47:08 UTC (rev 29520)
+++ branches/1.4/test/unit/i18n/sfMessageSource_XLIFFTest.php 2010-05-19
11:47:56 UTC (rev 29521)
@@ -19,7 +19,6 @@
// copy fixtures to tmp directory
copy(dirname(__FILE__).'/fixtures/messages.fr.xml', $temp.'/messages.fr.xml');
-copy(dirname(__FILE__).'/fixtures/invalid.xml', $temp.'/invalid.xml');
$source = sfMessageSource::factory('XLIFF', $temp);
$source->setCulture('fr_FR');
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" 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/symfony-svn?hl=en.