fixed if statetment. add cast (fixes #871)
fixed if statetment. add cast (fixes #871)

openpne/OpenPNE3,ShinichiU/OpenPNE3,tejima/testravis,isaosano/OpenPNE3,upsilon/OpenPNE3,kashiwasan/symfony-advanced,tejima/OP3PKG,balibali/KakiageSNS,nishizoe/OpenPNE3,openpne/OpenPNE3,balibali/KakiageSNS,ShinichiU/AuthFramework,nise-nabe/ppcon-sns,tejima/testravis,upsilon/travis-test,C-nakajima/OpenPNE3,ShinichiU/OpenPNE3,openpne/OpenPNE3,openpne/OpenPNE3,ShinichiU/OpenPNE3,C-nakajima/OpenPNE3,C-nakajima/OpenPNE3,tejima/testravis,upsilon/OpenPNE3,C-nakajima/OpenPNE3,isaosano/OpenPNE3,nishizoe/OpenPNE3,kashiwasan/symfony-advanced,ShinichiU/OpenPNE3,nise-nabe/ppcon-sns,upsilon/travis-test,isaosano/OpenPNE3,isaosano/OpenPNE3,tejima/OP3PKG,ShinichiU/AuthFramework,ShinichiU/AuthFramework