mirror of
https://github.com/processwire/processwire.git
synced 2025-08-12 01:34:31 +02:00
Detect NullPage in InputfieldCKEditor::getImagesFieldName() to fix issue that appeared for someone when editing page with no images fields.
This commit is contained in:
@@ -222,7 +222,7 @@ class InputfieldCKEditor extends InputfieldTextarea {
|
||||
if(!is_array($imageFields)) $imageFields = array();
|
||||
if(in_array('x', $imageFields)) return '';
|
||||
$page = $this->hasPage;
|
||||
if(!$page) return '';
|
||||
if(!$page || !$page->id || !$page->template) return '';
|
||||
$result = '';
|
||||
foreach($imageFields as $name) {
|
||||
if($page->template->hasField($name)) {
|
||||
|
Reference in New Issue
Block a user