Your project should not use deprecated PHP features 3

More information: https://insight.symfony.com/what-we-analyse/php.use_deprecated_function

  1. $result = curl_exec($curl);
  2. if (empty($result)) {
  3. $info = curl_getinfo($curl);
  4. curl_close($curl);
    curl_close() has been deprecated in PHP 8.5 and will be removed from PHP in the next major version.
    Time to fix: about 2 hours
    Read doc Permalink Copy Prompt
    Last edited by ClicShopping
  5. } else {
  6. $info = 'error';
  7. }
  8. return $info;
  1. $result = curl_exec($curl);
  2. if (empty($result)) {
  3. $info = curl_getinfo($curl);
  4. curl_close($curl);
    curl_close() has been deprecated in PHP 8.5 and will be removed from PHP in the next major version.
    Time to fix: about 2 hours
    Read doc Permalink Copy Prompt
    Last edited by ClicShopping
  5. } else {
  6. $info = 'error';
  7. }
  8. return $info;
  1. $result = curl_exec($curl);
  2. if (empty($result)) {
  3. $info = curl_getinfo($curl);
  4. curl_close($curl);
    curl_close() has been deprecated in PHP 8.5 and will be removed from PHP in the next major version.
    Time to fix: about 2 hours
    Read doc Permalink Copy Prompt
    Last edited by ClicShopping
  5. } else {
  6. $info = 'error';
  7. }
  8. return $info;

Mutable DateTime should be avoided in favor of DateTimeImmutable 2

More information: https://insight.symfony.com/what-we-analyse/php.prefer_date_time_immutable

  1. if (!empty($_POST['schdate'])) {
  2. $schdate = HTML::sanitize($_POST['schdate']);
  3. $date1 = new \DateTime(date('Y-m-d'));
  4. $date2 = new \DateTime($schdate);
    Use DateTimeImmutable instead of DateTime.
    Time to fix: about 30 minutes
    Read doc Permalink Copy Prompt
    Last edited by ClicShopping
  5. if ($date1 < $date2) {
  6. $status = 0;
  7. }
  8. } else {
  1. if (!empty($_POST['schdate'])) {
  2. $schdate = HTML::sanitize($_POST['schdate']);
  3. $date1 = new \DateTime(date('Y-m-d'));
  4. $date2 = new \DateTime($schdate);
    Use DateTimeImmutable instead of DateTime.
    Time to fix: about 30 minutes
    Read doc Permalink Copy Prompt
    Last edited by ClicShopping
  5. if ($date1 < $date2) {
  6. $status = 0;
  7. }
  8. } else {