It seems that it makes that this line makes my server crash. I think it needs to be edited to accodomate null values of the var "iResult"