Release of v4.0.3-alpha2
Fix library save as copy error. #1162. Fix the error when no components exists. #1164. Fix search page error due to File class.
This commit is contained in:
@ -445,10 +445,10 @@ class CompilerModel extends ListModel
|
||||
/**
|
||||
* Get all components in the system
|
||||
*
|
||||
* @return array
|
||||
* @return array|null
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function getComponents(): array
|
||||
public function getComponents(): ?array
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = $this->getDbo();
|
||||
@ -471,9 +471,8 @@ class CompilerModel extends ListModel
|
||||
$db->setQuery($query);
|
||||
|
||||
// return the result
|
||||
return $db->loadObjectList();
|
||||
return $db->loadObjectList() ?? null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get all dynamic content
|
||||
|
@ -1176,7 +1176,7 @@ class LibraryModel extends AdminModel
|
||||
// also check to insure these names are not used again
|
||||
if (!isset(ComponentbuilderHelper::$libraryNames[$data['id']]) && in_array($data['name'], ComponentbuilderHelper::$libraryNames))
|
||||
{
|
||||
$data['name'] = $this->generateUniqe('name', $data['name']);
|
||||
$data['name'] = $this->generateUnique('name', $data['name']);
|
||||
}
|
||||
|
||||
// Set the Params Items to data
|
||||
|
@ -352,10 +352,10 @@ class SearchModel extends ItemModel
|
||||
/**
|
||||
* Get all components in the system
|
||||
*
|
||||
* @return array
|
||||
* @return array|null
|
||||
* @since 3.2.0
|
||||
**/
|
||||
public function getComponents(): array
|
||||
public function getComponents(): ?array
|
||||
{
|
||||
// Get a db connection.
|
||||
$db = $this->getDbo();
|
||||
@ -378,7 +378,6 @@ class SearchModel extends ItemModel
|
||||
$db->setQuery($query);
|
||||
|
||||
// return the result
|
||||
return $db->loadObjectList();
|
||||
}
|
||||
|
||||
return $db->loadObjectList() ?? null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user