return early if no servers are defined instead of logging a warning

This commit is contained in:
Isaac Connor 2016-01-04 09:36:45 -05:00
parent c639822d62
commit d256530896
1 changed files with 4 additions and 0 deletions

View File

@ -99,6 +99,10 @@ function CORSHeaders() {
# The following is left for future reference/use.
$valid = false;
$servers = dbFetchAll( 'SELECT * FROM Servers' );
if ( ! sizeof($servers) ) {
return;
}
foreach( dbFetchAll( 'SELECT * FROM Servers' ) as $row ) {
$Server = new Server( $row );
if ( $_SERVER['HTTP_ORIGIN'] == $Server->Url() ) {