Skip to content
This repository has been archived by the owner on Mar 15, 2020. It is now read-only.

Commit

Permalink
Remove exceptions on duplicate functions. If they already exist (e.g.…
Browse files Browse the repository at this point in the history
… global install) just use whatever is defined. They all secure.
  • Loading branch information
padraic committed Mar 21, 2015
1 parent 37b4524 commit d7851d4
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions src/function.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ function humbug_get_contents($filename, $use_include_path = false, $context = nu
return $return;
}

} else {
throw new \RuntimeException(
'Function has already been defined'
);
}

if (!function_exists('humbug_get_headers')) {
Expand All @@ -43,10 +39,6 @@ function humbug_get_headers() {
return FileGetContents::getLastResponseHeaders();
}

} else {
throw new \RuntimeException(
'Function has already been defined'
);
}

if (!function_exists('humbug_set_headers')) {
Expand All @@ -55,8 +47,4 @@ function humbug_set_headers(array $headers) {
return FileGetContents::setNextRequestHeaders($headers);
}

} else {
throw new \RuntimeException(
'Function has already been defined'
);
}

0 comments on commit d7851d4

Please sign in to comment.