mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fix monster not found exception
This commit is contained in:
parent
9a27403e7d
commit
ef79b99b8a
@ -39,9 +39,11 @@ if (empty($_REQUEST['name'])) {
|
|||||||
|
|
||||||
// display monster
|
// display monster
|
||||||
$monster_name = urldecode(stripslashes(ucwords(strtolower($_REQUEST['name']))));
|
$monster_name = urldecode(stripslashes(ucwords(strtolower($_REQUEST['name']))));
|
||||||
$monster = Monster::where('hide', '!=', 1)->where('name', $monster_name)->first()->toArray();
|
$monster = Monster::where('hide', '!=', 1)->where('name', $monster_name)->first();
|
||||||
|
|
||||||
|
if ($monster && isset($monster->name)) {
|
||||||
|
$monster = $monster->toArray();
|
||||||
|
|
||||||
if (isset($monster['name'])) {
|
|
||||||
function sort_by_chance($a, $b)
|
function sort_by_chance($a, $b)
|
||||||
{
|
{
|
||||||
if ($a['chance'] == $b['chance']) {
|
if ($a['chance'] == $b['chance']) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user