Your project should not use deprecated PHP features 3
- Read doc
- Productivity
- Major
More information: https://insight.symfony.com/what-we-analyse/php.use_deprecated_function
- $result = curl_exec($curl);
- if (empty($result)) {
- $info = curl_getinfo($curl);
- curl_close($curl);
- } else {
- $info = 'error';
- }
- return $info;
- $result = curl_exec($curl);
- if (empty($result)) {
- $info = curl_getinfo($curl);
- curl_close($curl);
- } else {
- $info = 'error';
- }
- return $info;
- $result = curl_exec($curl);
- if (empty($result)) {
- $info = curl_getinfo($curl);
- curl_close($curl);
- } else {
- $info = 'error';
- }
- return $info;
Mutable DateTime should be avoided in favor of DateTimeImmutable 2
- Read doc
- Reliability
- Minor
More information: https://insight.symfony.com/what-we-analyse/php.prefer_date_time_immutable
- if (!empty($_POST['schdate'])) {
- $schdate = HTML::sanitize($_POST['schdate']);
- $date1 = new \DateTime(date('Y-m-d'));
- $date2 = new \DateTime($schdate);
- if ($date1 < $date2) {
- $status = 0;
- }
- } else {
- if (!empty($_POST['schdate'])) {
- $schdate = HTML::sanitize($_POST['schdate']);
- $date1 = new \DateTime(date('Y-m-d'));
- $date2 = new \DateTime($schdate);
- if ($date1 < $date2) {
- $status = 0;
- }
- } else {