Bug #4810: fixed detect magic quotes

http://dev.kohanaframework.org/issues/4810