Merge pull request #4621 from atif-shaikh/CRM-15589
[civicrm-core.git] / CRM / Utils / System.php
index 94fc2b69b93aa79a6d158edf10cc7981e1c0e000..91fc83dd25e7078316edb8e0160eb4b5d93480ab 100644 (file)
@@ -981,7 +981,8 @@ class CRM_Utils_System {
     // lets capture the return stuff rather than echo
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE );
 
-    return curl_exec($ch);
+    // CRM-13227, CRM-14744: only return the SSL error status
+    return (curl_exec($ch) !== FALSE);
   }
 
   /**
@@ -1518,8 +1519,7 @@ class CRM_Utils_System {
    * @param bool $throwError
    * @param $realPath
    */
-  static function loadBootStrap($params = array(
-    ), $loadUser = TRUE, $throwError = TRUE, $realPath = NULL) {
+  static function loadBootStrap($params = array(), $loadUser = TRUE, $throwError = TRUE, $realPath = NULL) {
     if (!is_array($params)) {
       $params = array();
     }
@@ -1621,7 +1621,6 @@ class CRM_Utils_System {
    * @param string $url
    * @param bool $removeLanguagePart
    *
-   * @internal param bool $remoteLanguagePart
    * @return string
    */
   static function absoluteURL($url, $removeLanguagePart = FALSE) {
@@ -1643,7 +1642,7 @@ class CRM_Utils_System {
   }
 
   /**
-   * Function to clean url, replaces first '&' with '?'
+   * clean url, replaces first '&' with '?'
    *
    * @param string $url
    *
@@ -1765,10 +1764,9 @@ class CRM_Utils_System {
    *   each element.
    * @access public
    */
-  static function getPluginList($relpath, $fext = '.php', $skipList = array(
-    )) {
-    $fext_len  = strlen($fext);
-    $plugins   = array();
+  static function getPluginList($relpath, $fext = '.php', $skipList = array()) {
+    $fext_len = strlen($fext);
+    $plugins = array();
     $inc_files = CRM_Utils_System::listIncludeFiles($relpath);
     foreach ($inc_files as $inc_file) {
       if (substr($inc_file, 0 - $fext_len) == $fext) {