mirror of
				https://github.com/billz/raspap-webgui.git
				synced 2025-03-01 10:31:47 +00:00 
			
		
		
		
	Fix PHP notices
This commit is contained in:
		| @@ -34,7 +34,7 @@ class System { | ||||
|  | ||||
|     public function processorCount() { | ||||
|         $procs = shell_exec("nproc --all"); | ||||
|     return intval($proc); | ||||
|         return intval($procs); | ||||
|     } | ||||
|  | ||||
|     public function loadAvg1Min() { | ||||
| @@ -48,7 +48,7 @@ class System { | ||||
|  | ||||
|     public function systemTemperature() { | ||||
|         $cpuTemp = file_get_contents("/sys/class/thermal/thermal_zone0/temp"); | ||||
|     return number_format($cpuTemp/1000, 1); | ||||
|         return number_format((float)$cpuTemp/1000, 1); | ||||
|     } | ||||
|  | ||||
|     public function hostapdStatus() { | ||||
|   | ||||
| @@ -28,7 +28,7 @@ if ($cpuload > 90) { | ||||
|     $cpuload_status = "danger"; | ||||
| } elseif ($cpuload > 75) { | ||||
|     $cpuload_status = "warning"; | ||||
| } elseif ($cpuload >  0) { | ||||
| } elseif ($cpuload >=  0) { | ||||
|     $cpuload_status = "success"; | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -108,7 +108,7 @@ $bridgedEnabled = $arrHostapdConf['BridgedEnable']; | ||||
|     <!-- Page Wrapper --> | ||||
|     <div id="wrapper"> | ||||
|       <!-- Sidebar --> | ||||
|       <ul class="navbar-nav sidebar sidebar-light d-none d-md-block accordion <?php echo $toggleState; ?>" id="accordionSidebar"> | ||||
|       <ul class="navbar-nav sidebar sidebar-light d-none d-md-block accordion <?php echo (isset($toggleState)) ? $toggleState : null ; ?>" id="accordionSidebar"> | ||||
|         <!-- Sidebar - Brand --> | ||||
|         <a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.php?page=wlan0_info"> | ||||
|           <div class="sidebar-brand-text ml-1">RaspAP</div> | ||||
|   | ||||
| @@ -59,8 +59,7 @@ | ||||
|                 <div class="row"> | ||||
|                   <div class="form-group col-md-8"> | ||||
|                     <?php | ||||
|                         $log = file_get_contents('/tmp/openvpn.log'); | ||||
|                         echo '<textarea class="logoutput">'.htmlspecialchars($log, ENT_QUOTES).'</textarea>'; | ||||
|                         echo '<textarea class="logoutput"></textarea>'; | ||||
|                     ?> | ||||
|                   </div> | ||||
|                 </div> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user