Explorar el Código

Constructor checks for LDAP support in PHP.

pallo hace 25 años
padre
commit
be389a99c2
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      functions/abook_ldap_server.php

+ 4 - 0
functions/abook_ldap_server.php

@@ -37,6 +37,10 @@
 
      // Constructor. Connects to database
      function abook_ldap_server($param) {
+       if(!function_exists("ldap_connect")) {
+         $this->set_error("LDAP support missing from PHP");
+         return;
+       }
        if(is_array($param)) {
 	 $this->server = $param["host"];
 	 $this->basedn = $param["base"];