pterodactyl / panel

Pterodactyl® is a free, open-source game server management panel built with PHP, React, and Go. Designed with security in mind, Pterodactyl runs all game servers in isolated Docker containers while exposing a beautiful and intuitive UI to end users.
https://pterodactyl.io
Other
6.63k stars 1.67k forks source link

Admin Area doesn't works #49

Closed YoLaw closed 8 years ago

YoLaw commented 8 years ago

Hello, I'm admninistrator logged as root to the panel, and the admin Area is not working... Here is screens:

http://www.noelshack.com/2016-04-1453822543-sans-titre.png http://www.noelshack.com/2016-04-1453822543-sans-titre2.png

I'm using the 0.1.2 version and I tried 0.1.1 too. Same problem on the two versions. Thanks!

DaneEveritt commented 8 years ago

I have confirmed this as being an issue with the data being stored in the database. For whatever reason his root_admin key was set to 1 but was being returned as a string and not an integer. This caused the code in this file to break because of the strict check !==.

DaneEveritt commented 8 years ago

Tested on my development and live development systems and didn't have it output as a string. A possible workaround for this might be to modify the model for this (and probably all the others) and add a $casts array to it so that Laravel always returns the data as an integer.

YoLaw commented 8 years ago

Tactical Fish helped me to resolve the problem and the problem was the double "="

DaneEveritt commented 8 years ago

user information

uname -a : Linux vps239092.ovh.net 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u1 (2015-12-14) x86_64 GNU/Linux

php -v:

PHP 5.6.17-0+deb8u1 (cli) (built: Jan 13 2016 09:10:12)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

php -m

[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
ereg
exif
fileinfo
filter
ftp
gd
gettext
hash
iconv
json
libxml
mbstring
mcrypt
mhash
mysql
mysqli
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
wddx
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache```