fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [17028] booking: preparing for php 7.2


From: sigurdne
Subject: [Fmsystem-commits] [17028] booking: preparing for php 7.2
Date: Sun, 3 Sep 2017 07:43:36 -0400 (EDT)

Revision: 17028
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17028
Author:   sigurdne
Date:     2017-09-03 07:43:36 -0400 (Sun, 03 Sep 2017)
Log Message:
-----------
booking: preparing for php 7.2

Modified Paths:
--------------
    trunk/booking/inc/schedule.php

Modified: trunk/booking/inc/schedule.php
===================================================================
--- trunk/booking/inc/schedule.php      2017-09-02 15:02:48 UTC (rev 17027)
+++ trunk/booking/inc/schedule.php      2017-09-03 11:43:36 UTC (rev 17028)
@@ -59,7 +59,24 @@
                        // Bookings found
                        else
                        {
-                               $next = 
array_filter(array_merge(array_map('get_from', $bookings), array_map('get_to', 
$bookings)), create_function('$a', "return \$a > '$t';"));
+                               /**
+                                * create_function will be deprecated from PHP 
7.2
+                                */
+//                             $next = 
array_filter(array_merge(array_map('get_from', $bookings), array_map('get_to', 
$bookings)), create_function('$a', "return \$a > '$t';"));
+                               $next = array();
+                               $next_candidates = 
array_merge(array_map('get_from', $bookings), array_map('get_to', $bookings));
+
+                               if($next_candidates)
+                               {
+                                       foreach ($next_candidates as 
$next_candidate)
+                                       {
+                                               if($next_candidate > $t)
+                                               {
+                                                       $next[] = 
$next_candidate;
+                                               }
+                                       }
+                               }
+
                                if (!$next)
                                {
                                        break;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]