diff --git a/legacy/application/models/Preference.php b/legacy/application/models/Preference.php index c126502e9..4297e874c 100644 --- a/legacy/application/models/Preference.php +++ b/legacy/application/models/Preference.php @@ -63,8 +63,10 @@ class Application_Model_Preference $paramMap = []; if ($result > 1) { // this case should not happen. + $caller = debug_backtrace()[1]['function']; + throw new Exception('Invalid number of results returned. Should be ' . - "0 or 1, but is '{$result}' instead"); + "0 or 1, but is '{$result}' instead, caller={$caller}"); } if ($result == 1) { // result found