|
From: <rd...@us...> - 2015-02-06 15:21:18
|
Revision: 2043
http://sourceforge.net/p/digir/svn/2043
Author: rdg
Date: 2015-02-06 15:21:16 +0000 (Fri, 06 Feb 2015)
Log Message:
-----------
Avoid fatal error in PHP5.5
Modified Paths:
--------------
tapirlink/trunk/lib/xpath/XPath.class.php
Modified: tapirlink/trunk/lib/xpath/XPath.class.php
===================================================================
--- tapirlink/trunk/lib/xpath/XPath.class.php 2014-04-14 14:55:33 UTC (rev 2042)
+++ tapirlink/trunk/lib/xpath/XPath.class.php 2015-02-06 15:21:16 UTC (rev 2043)
@@ -3747,7 +3747,6 @@
$cacheKey = $step;
do { // parse block
- $parseBlock = 1;
if (isset($aResultsCache[$cacheKey])) {
return $aResultsCache[$cacheKey];
@@ -3771,14 +3770,14 @@
$step = '.';
$axis['axis'] = 'self';
$axis['node-test'] = '*';
- break $parseBlock;
+ break 1;
}
if ($step == '..') {
// Select the parent axis.
$axis['axis'] = 'parent';
$axis['node-test'] = '*';
- break $parseBlock;
+ break 1;
}
///////////////////////////////////////////////////
@@ -3830,7 +3829,7 @@
if ($step == '*') {
// Use the child axis and select all children.
$axis['node-test'] = '*';
- break $parseBlock;
+ break 1;
}
// ### I'm pretty sure our current handling of cdata is a fudge, and we should
@@ -3838,7 +3837,7 @@
if ($step == "text()") {
// Handle the text node
$axis["node-test"] = "cdata";
- break $parseBlock;
+ break 1;
}
// There are a few node tests that we match verbatim.
@@ -3847,14 +3846,14 @@
|| $step == "text()"
|| $step == "processing-instruction") {
$axis["node-test"] = $step;
- break $parseBlock;
+ break 1;
}
// processing-instruction() is allowed to take an argument, but if it does, the argument
// is a literal, which we will have parsed out to $[number].
if (preg_match(":processing-instruction\(\$\d*\):", $step)) {
$axis["node-test"] = $step;
- break $parseBlock;
+ break 1;
}
// The only remaining way this can be a step, is if the remaining string is a simple name
@@ -3882,7 +3881,7 @@
// Not currently recursing
$LastFailedStep = '';
$LastFailedContext = '';
- break $parseBlock;
+ break 1;
}
// It's not a node then, we must treat it as a PrimaryExpr
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|