Skip to content

Commit cb6b75c

Browse files
committed
Added quotes around fields in the SQL that have the option to be null. Not sure if this is a recent MySQL syntax change or those got deleted somehow, but now they are back. Fixed #1646
1 parent 35a64f5 commit cb6b75c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

classes/PowerDistribution.class.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,10 @@ function CreatePDU($pduid=null){
203203
IPAddress=\"$this->IPAddress\", SNMPCommunity=\"$this->SNMPCommunity\",
204204
PanelID=$this->PanelID, BreakerSize=$this->BreakerSize, FirmwareVersion=\"$this->FirmwareVersion\",
205205
PanelPole=\"$this->PanelPole\", InputAmperage=$this->InputAmperage,
206-
FailSafe=$this->FailSafe, PanelID2=$this->PanelID2,
207-
PanelPole2=$this->PanelPole2$sqladdon;";
206+
FailSafe=$this->FailSafe, PanelID2=\"$this->PanelID2\",
207+
PanelPole2=\"$this->PanelPole2\"$sqladdon;";
208+
209+
error_log( $sql );
208210

209211
if($this->exec($sql)){
210212
$this->PDUID=$dbh->lastInsertId();

scripts/AppendGrid.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)