Skip to content

Commit 31ece57

Browse files
committed
Fixes Database Error 1048 : Column 'nextreviewdate' cannot be null
(cherry picked from commit 1c9d8e3e8e0ae711c66c6a10f4320556098a1ffe)
1 parent 5f0d6f5 commit 31ece57

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

HRPerformanceReviews.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
if ($InputError != 1) {
3232
$ReviewDate = FormatDateForSQL($_POST['ReviewDate']);
33-
$NextReviewDate = !empty($_POST['NextReviewDate']) && is_date($_POST['NextReviewDate']) ? "'" . FormatDateForSQL($_POST['NextReviewDate']) . "'" : 'NULL';
33+
$NextReviewDate = !empty($_POST['NextReviewDate']) && is_date(ConvertSQLDate($_POST['NextReviewDate'])) ? "'" . FormatDateForSQL($_POST['NextReviewDate']) . "'" : 'NULL';
3434

3535
if (isset($_POST['ReviewID']) && $_POST['ReviewID'] > 0) {
3636
// Update existing review
@@ -146,8 +146,7 @@
146146
}
147147
}
148148

149-
echo '
150-
<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">
149+
echo '<form method="post" action="' . htmlspecialchars($_SERVER['PHP_SELF'], ENT_QUOTES, 'UTF-8') . '">
151150
<input type="hidden" name="FormID" value="' . $_SESSION['FormID'] . '" />';
152151

153152
echo '<fieldset>
@@ -219,8 +218,7 @@
219218
<option value="Mid-Year"' . ($ReviewType == 'Mid-Year' ? ' selected="selected"' : '') . '>' . __('Mid-Year') . '</option>
220219
<option value="Project"' . ($ReviewType == 'Project' ? ' selected="selected"' : '') . '>' . __('Project') . '</option>
221220
</select>
222-
</field>
223-
221+
</field>
224222
225223
<field>
226224
<label for="ScaleID">' . __('Rating Scale') . ':</label>

0 commit comments

Comments
 (0)