Skip to content

Commit

Permalink
string 'null' sent instead of null value caused data saving failure
Browse files Browse the repository at this point in the history
On licensing upload form, if no effective date is entered, this induce a msql error
similar problem on management module
  • Loading branch information
BU Lyon3 authored and spaceisntsyntax committed Oct 11, 2022
1 parent e20d92a commit 5a7b6ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion licensing/ajax_processing.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
if ((isset($_POST['effectiveDate'])) && ($_POST['effectiveDate'] != '')){
$document->effectiveDate = create_date_from_js_format($_POST['effectiveDate'])->format('Y-m-d');
}else{
$document->effectiveDate= 'null';
$document->effectiveDate = null;
}


Expand Down
2 changes: 1 addition & 1 deletion management/ajax_processing.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
if ((isset($_POST['effectiveDate'])) && ($_POST['effectiveDate'] != '')){
$document->effectiveDate = create_date_from_js_format($_POST['effectiveDate'])->format('Y-m-d');
}else{
$document->effectiveDate= 'null';
$document->effectiveDate = null;
}

if ((isset($_POST['revisionDate'])) && ($_POST['revisionDate'] != '')) {
Expand Down

0 comments on commit 5a7b6ef

Please sign in to comment.