mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 08:41:39 +09:00
Fix type error when module_name is null
This commit is contained in:
parent
6df4d38e04
commit
47e45c4076
1 changed files with 5 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ use MenuAdminController;
|
|||
use MenuAdminModel;
|
||||
use Rhymix\Framework\Cache;
|
||||
use Rhymix\Framework\Storage;
|
||||
use Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
use Rhymix\Modules\Admin\Models\AdminMenu as AdminMenuModel;
|
||||
use Rhymix\Modules\Admin\Models\Favorite as FavoriteModel;
|
||||
|
||||
|
|
@ -64,6 +65,10 @@ class AdminMenu extends Base
|
|||
{
|
||||
// Check if favorite exists.
|
||||
$module_name = Context::get('module_name');
|
||||
if (!$module_name)
|
||||
{
|
||||
throw new TargetNotFound();
|
||||
}
|
||||
$output = FavoriteModel::isFavorite($module_name);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue