noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 66/151: adapt for php 7.0


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 66/151: adapt for php 7.0
Date: Sat, 4 Feb 2017 17:14:28 +0000 (UTC)

sparkyx pushed a commit to branch master
in repository noalyss.

commit f6ea6b71fa5af13cb2782b5bca6ab6d3d02660d5
Author: Dany De Bontridder <address@hidden>
Date:   Sat Jul 30 00:12:12 2016 +0200

    adapt for php 7.0
---
 include/admin_repo.inc.php |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/include/admin_repo.inc.php b/include/admin_repo.inc.php
index 16b2afc..8493b39 100644
--- a/include/admin_repo.inc.php
+++ b/include/admin_repo.inc.php
@@ -167,9 +167,15 @@ img {float: right; border: 0px;}
 hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: 
#000000;}
             ';
     $a_table=$html->getElementsByTagName("table");
-    for ( $i = 0 ; $i < $a_table->length;$i++) {
-        
$a_table->item($i)->attributes->getNamedItem("width")->nodeValue="100%";
-        
+    
+    // For PHP  < 7 , we must change the attribute "width"
+    if ( substr(phpversion(),0,1) != "7" )
+    {
+        for ( $i = 0 ; $i < $a_table->length;$i++) {
+            $node=$a_table->item($i);
+            $node->attributes->getNamedItem("width")->nodeValue="100%";
+
+        }
     }
     $a_title = $html->getElementsByTagName("title");
     for ( $i = 0;$i<$a_title->length;$i++) {



reply via email to

[Prev in Thread] Current Thread [Next in Thread]