Fix for missing proxy_host if script is not installed yet and requires a HTTP request.
authorRoland Haeder <roland@mxchange.org>
Thu, 17 Apr 2014 21:26:01 +0000 (23:26 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 17 Apr 2014 21:26:01 +0000 (23:26 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
inc/http-functions.php

index ed9250603be4a0c9545114c00858350fa01cb015..9bdf939021f3f0cb7b3f9098d4ecdddd77259d52 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : HTTP-relevante Funktionen                        *
  * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
@@ -343,8 +338,14 @@ function sendRawRequest ($host, $request, $allowOnlyHttpOkay = TRUE) {
        // Get resolver instance
        $resolver = new HostnameResolver();
 
-       // Get proxy host
-       $proxyHost = compileRawCode(getProxyHost());
+       // Default is no proxy
+       $proxyHost = NULL;
+
+       // Is the configuration entry set?
+       if ((!isInstaller()) && (isConfigEntrySet('proxy_host'))) {
+               // Get proxy host
+               $proxyHost = compileRawCode(getProxyHost());
+       } // END - if
 
        // Open connection
        if (isProxyUsed() === TRUE) {