Bug fixes, php library

#Modification:
1. Bug fix in switch code for failed validation
2. GET request validation only when query parameters exist