Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* BEST ?
- if($isError1) {
- doStepOne();
- if(!$isError2) {
- doStepTwo();
- } else {
- header("HTTP/1.1 415 Unsupported Media Type");
- trigger_error("HTTP/1.1 415 Unsupported Media Type", E_USER_ERROR);
- exit;
- }
- } else {
- header("HTTP/1.1 415 Unsupported Media Type");
- trigger_error("HTTP/1.1 415 Unsupported Media Type", E_USER_ERROR);
- exit;
- }
- /* VERSUS */
- if($isError1) {
- header("HTTP/1.1 415 Unsupported Media Type");
- trigger_error("HTTP/1.1 415 Unsupported Media Type", E_USER_ERROR);
- exit;
- }
- doStepOne();
- if($isError2) {
- header("HTTP/1.1 415 Unsupported Media Type");
- trigger_error("HTTP/1.1 415 Unsupported Media Type", E_USER_ERROR);
- exit;
- }
- doStepTwo();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement