count blank header as null
This commit is contained in:
parent
473c0f0bcb
commit
abe473ffd6
1 changed files with 5 additions and 1 deletions
|
@ -66,7 +66,11 @@ class Block {
|
||||||
$this->body = $body;
|
$this->body = $body;
|
||||||
$this->section = $section;
|
$this->section = $section;
|
||||||
$this->position = $position;
|
$this->position = $position;
|
||||||
$this->id = preg_replace('/[^\w]/', '',str_replace(' ', '_', is_null($id) ? (is_null($header) ? md5($body) : $header) . $section : $id));
|
|
||||||
|
if(is_null($id)) {
|
||||||
|
$id = (empty($header) ? md5($body) : $header) . $section;
|
||||||
|
}
|
||||||
|
$this->id = preg_replace('/[^\w]/', '',str_replace(' ', '_', $id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Reference in a new issue