From 092b8c28c90f014a2e14d01a99bd5c04756ede59 Mon Sep 17 00:00:00 2001 From: Murtaza Sultani Date: Thu, 26 Feb 2026 09:56:58 +0100 Subject: Remove un related changes --- lib/classes/SimpleORMap.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/classes/SimpleORMap.php b/lib/classes/SimpleORMap.php index 4fcc799..6e2f044 100644 --- a/lib/classes/SimpleORMap.php +++ b/lib/classes/SimpleORMap.php @@ -919,20 +919,19 @@ abstract class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate $where_param = is_array($arguments[0]) ? $arguments[0] : [$arguments[0]]; $action = strstr($name, 'by', true); $field = substr($name, strlen($action) + 2); - switch ($action) { case 'findone': $order = $arguments[1] ?? ''; $param_arr[0] =& $where; $param_arr[1] = [$where_param]; - $name = 'findonebysql'; + $method = 'findonebysql'; break; case 'find': case 'findmany': $order = $arguments[1] ?? ''; $param_arr[0] =& $where; $param_arr[1] = [$where_param]; - $name = 'findbysql'; + $method = 'findbysql'; break; case 'findeach': case 'findeachmany': @@ -940,13 +939,13 @@ abstract class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate $param_arr[0] = $arguments[0]; $param_arr[1] =& $where; $param_arr[2] = [$arguments[1]]; - $name = 'findeachbysql'; + $method = 'findeachbysql'; break; case 'count': case 'delete': $param_arr[0] =& $where; $param_arr[1] = [$where_param]; - $name = "{$action}bysql"; + $method = "{$action}bysql"; break; default: throw new BadMethodCallException("Method " . static::class . "::$name not found"); @@ -956,7 +955,7 @@ abstract class SimpleORMap implements ArrayAccess, Countable, IteratorAggregate } if (isset($db_fields[$field])) { $where = "`$db_table`.`$field` IN(?) " . $order; - return call_user_func_array([static::class, $name], $param_arr); + return call_user_func_array([static::class, $method], $param_arr); } throw new BadMethodCallException("Method " . static::class . "::$name not found"); } -- cgit v1.0