warn about obsolete setting
authordemeritcowboy <demeritcowboy@hotmail.com>
Mon, 1 May 2023 15:47:14 +0000 (11:47 -0400)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Mon, 1 May 2023 15:47:14 +0000 (11:47 -0400)
CRM/Upgrade/Incremental/php/FiveSixtyTwo.php

index 39d2e0da2fcbe53f1cb6b6d934507199276248aa..59f18937e992e58fd1505dcae4adc2f1c0a03fae 100644 (file)
@@ -31,6 +31,13 @@ class CRM_Upgrade_Incremental_php_FiveSixtyTwo extends CRM_Upgrade_Incremental_B
         // See also: https://lab.civicrm.org/dev/core/-/issues/3961
         $preUpgradeMessage .= "<p>{$message}</p>";
       }
+
+      if (defined('CIVICRM_SETTINGS_PATH') && CIVICRM_SETTINGS_PATH) {
+        $contents = file_get_contents(CIVICRM_SETTINGS_PATH);
+        if (strpos($contents, 'auto_detect_line_endings') !== FALSE) {
+          $preUpgradeMessage .= '<p>' . ts('Your civicrm.settings.php file contains a line to set the php variable `auto_detect_line_endings`. It is deprecated and the line should be removed from the file.') . '</p>';
+        }
+      }
     }
   }