From 781c3992d9f6c21ad92dfddc172bce5daba74464 Mon Sep 17 00:00:00 2001 From: Alan Date: Thu, 18 Jan 2024 16:21:25 +0800 Subject: [PATCH] php8 compat (probably breaks php5 now) --- RooPostTrait.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/RooPostTrait.php b/RooPostTrait.php index 9f6b9c9b..33890369 100644 --- a/RooPostTrait.php +++ b/RooPostTrait.php @@ -189,8 +189,13 @@ trait Pman_Core_RooPostTrait { // echo '
';print_r($affects);exit;
        // DB_Dataobject::debugLevel(1);
        
-        
-        $clean = create_function('$v', 'return (int)$v;');
+        if (function_exists('create_function')) {
+            $clean = create_function('$v', 'return (int)$v;');
+        } else {
+            $clean = function($v) {
+                return (int)$v;
+            };
+        }
         
         $bits = array_map($clean, explode(',', $req['_delete']));
         
-- 
2.39.2