Do not die on SQL warning
If we change a field from VARCHAR to enum, we will get warnings as possibly truncating data. Accept this and carry on. Only fail on an error.
This commit is contained in:
parent
d8cc6f3ba1
commit
4fcf16b317
10
install.php
10
install.php
|
@ -474,11 +474,11 @@ function InstallDB_updateSchema($db_config)
|
|||
outn("<li>" . _("Modifying table ") . $tabl_name ."</li>");
|
||||
|
||||
$sql_modify = "ALTER TABLE `" . $tabl_name . "` " . substr($sql_modify, 0, -2) . ';';
|
||||
$check = $db->query($sql_modify);
|
||||
if (DB::IsError($check)) {
|
||||
out("<li>" . print_r($check, 1) . "</li>");
|
||||
die("Can not modify " . $tabl_name . " table sql: " . $sql_modify . "n");
|
||||
die_freepbx("Can not modify " . $tabl_name . " table sql: " . $sql_modify . "n");
|
||||
try {
|
||||
$check = $db->query($sql_modify);
|
||||
} catch (\Exception $e) {
|
||||
dbug('exception is', $e);
|
||||
die_freepbx("Can not modify {$tabl_name}. SQL: {$sql_create} \n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<module>
|
||||
<rawname>sccp_manager</rawname>
|
||||
<name>SCCP Manager</name>
|
||||
<version>14.3.0.0</version>
|
||||
<version>14.3.0.1</version>
|
||||
<type>setup</type>
|
||||
<category>SCCP Connectivity</category>
|
||||
<publisher>Steve Lad, Alex GP</publisher>
|
||||
|
|
|
@ -180,12 +180,12 @@ trait helperfunctions {
|
|||
|
||||
// fetch file content
|
||||
$numbytes = socket_recvfrom($socket, $buffer, 84, MSG_WAITALL, $host, $port);
|
||||
|
||||
|
||||
// unpack the returned buffer and discard the first two bytes
|
||||
$pkt = unpack("nopcode/nblockno/a*data", $buffer);
|
||||
|
||||
|
||||
// send ack
|
||||
$packet = chr(4) . chr(pkt["blockno"]);
|
||||
$packet = chr(4) . chr($pkt["blockno"]);
|
||||
socket_sendto($socket, $packet, strlen($packet), MSG_EOR, $host, $port);
|
||||
|
||||
socket_close($socket);
|
||||
|
|
Loading…
Reference in a new issue