diff --git a/lib/SimpleSAML/Auth/LDAP.php b/lib/SimpleSAML/Auth/LDAP.php index db95377c41a98c0abd9d32a9f75ae959112cc274..efde8b916936c9f1ef82f209c71022f6dfcb9c8c 100644 --- a/lib/SimpleSAML/Auth/LDAP.php +++ b/lib/SimpleSAML/Auth/LDAP.php @@ -90,11 +90,8 @@ class SimpleSAML_Auth_LDAP { // (OpenLDAP 2.x.x or Netscape Directory SDK x.x needed). $this->timeout = $timeout; if ($timeout > 0) { - if (defined('LDAP_OPT_NETWORK_TIMEOUT')) { - /* This option isn't present before PHP 5.3. */ - if (!@ldap_set_option($this->ldap, constant('LDAP_OPT_NETWORK_TIMEOUT'), $timeout)) - SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_NETWORK_TIMEOUT) to ' . $timeout); - } + if (!@ldap_set_option($this->ldap, LDAP_OPT_NETWORK_TIMEOUT, $timeout)) + SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_NETWORK_TIMEOUT) to ' . $timeout); if (!@ldap_set_option($this->ldap, LDAP_OPT_TIMELIMIT, $timeout)) SimpleSAML_Logger::warning('Library - LDAP __construct(): Unable to set timeouts (LDAP_OPT_TIMELIMIT) to ' . $timeout); } diff --git a/modules/core/hooks/hook_sanitycheck.php b/modules/core/hooks/hook_sanitycheck.php index b0848d3fc986b3d365c621bb4d83e78d745c0e1d..24e0f812dc1bf0905a73fa29c3cf5dfdecb38164 100644 --- a/modules/core/hooks/hook_sanitycheck.php +++ b/modules/core/hooks/hook_sanitycheck.php @@ -25,8 +25,6 @@ function core_hook_sanitycheck(&$hookinfo) { if (version_compare(phpversion(), '5.3', '>=')) { $hookinfo['info'][] = '[core] You are running PHP version ' . phpversion() . '. Great.'; - } elseif( version_compare(phpversion(), '5.1.2', '>=')) { - $hookinfo['info'][] = '[core] You are running PHP version ' . phpversion() . '. It\'s recommended to upgrade to >= 5.2'; } else { $hookinfo['errors'][] = '[core] You are running PHP version ' . phpversion() . '. SimpleSAMLphp requires version >= 5.3. Please upgrade!'; }