Commit d077afb9 authored by anarcat's avatar anarcat Committed by anarcat

silence a warning when no serial number is present

parent 87484f5f
......@@ -81,9 +81,12 @@ class provisionService_dns extends provisionService {
* The serial, incremented based on current date and index
*/
function increment_serial($serial = null) {
$date = substr($serial, 0, 8); # Get the YYYYMMDD part
$today = date('Ymd');
if (is_null($serial) || $date != $today) {
if (is_null($serial)) {
return $today . '00';
}
$date = substr($serial, 0, 8); # Get the YYYYMMDD part
if ($date != $today) {
return $today . '00';
} else {
$index = substr($serial, 8, 2); # Get the index part
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment