Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phpsysinfo not working #142

Open
rampa069 opened this issue Aug 26, 2016 · 1 comment
Open

phpsysinfo not working #142

rampa069 opened this issue Aug 26, 2016 · 1 comment

Comments

@rampa069
Copy link
Contributor

phpsysinfo is not working with modern php. here is a quick fix.



diff --git a/admin/phpsysinfo/includes/XPath.class.php b/admin/phpsysinfo/includes/XPath.class.php
index 7425638..670ec49 100644
--- a/admin/phpsysinfo/includes/XPath.class.php
+++ b/admin/phpsysinfo/includes/XPath.class.php
@@ -3849,14 +3849,14 @@ class XPathEngine extends XPathBase {
         $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;
       }

       ///////////////////////////////////////////////////
@@ -3908,7 +3908,7 @@ class XPathEngine extends XPathBase {
       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
@@ -3916,7 +3916,7 @@ class XPathEngine extends XPathBase {
       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.
@@ -3925,14 +3925,14 @@ class XPathEngine extends XPathBase {
           || $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
@@ -3961,7 +3961,7 @@ class XPathEngine extends XPathBase {
         // Not currently recursing
         $LastFailedStep = '';
         $LastFailedContext = '';
-        break $parseBlock;
+        break 1;
       }

       // It's not a node then, we must treat it as a PrimaryExpr
@marnog
Copy link

marnog commented Mar 4, 2018

Buenas tardes Rampa069 esto simplemente lo agrego a hay otra forma de hacer funcionar el phpsysinfo.. gracias

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants