diff --git a/core/block.class.php b/core/block.class.php index 8fe1bfbc..0fffb41f 100644 --- a/core/block.class.php +++ b/core/block.class.php @@ -66,7 +66,11 @@ class Block { $this->body = $body; $this->section = $section; $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)); } /**