]> git.andy128k.dev Git - ipf.git/commitdiff
fix deprecations
authorAndrey Kutejko <andy128k@gmail.com>
Sun, 30 Sep 2018 07:35:10 +0000 (09:35 +0200)
committerAndrey Kutejko <andy128k@gmail.com>
Sun, 30 Sep 2018 07:35:10 +0000 (09:35 +0200)
ipf/admin/model.php
ipf/router.php

index 9253fe06c66a595dad6d27ec1a91dcd13041daee..6a56ef4609a70b8820504109592367dc78677106 100644 (file)
@@ -530,7 +530,7 @@ class IPF_Admin_Model
                 $str = $this->$listMethod($o);
             } else {
                 $t = $o->getTable()->getTypeOf($h['name']);
-                $str = $o->$h['name'];
+                $str = $o->{$h['name']};
                 switch ($t) {
                     case 'boolean':
                         if ($str)
index ffe2dacb50dc4266dcf9f9c3a91fcdb701c77948..e6607064a0d2899a87043a09daa42b9e9ae3a462 100644 (file)
@@ -159,11 +159,10 @@ class IPF_Router_RegexMatch
                 }
                 next($params);
             }
-            $func = create_function('$matches', 
-                                    'static $p = '.var_export($params, true).'; '.
-                                    '$a = current($p); '.
-                                    'next($p); '.
-                                    'return $a;');
+            $params_index = 0;
+            $func = function($matches) use($params, &$params_index) {
+                return $params[$params_index++];
+            };
             $url = preg_replace_callback($groups, $func, $url_regex);
         }
         $url = substr(substr($url, 2), 0, -2);