From 9b31ab91220dbc20537bab62620d723957a67ba2 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Tue, 18 Jun 2019 20:13:04 +0200 Subject: [PATCH] Throw exception in `WCF::__call()` for undefined methods --- wcfsetup/install/files/lib/system/WCF.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/WCF.class.php b/wcfsetup/install/files/lib/system/WCF.class.php index 16d26a9071..bf3fb73ba1 100644 --- a/wcfsetup/install/files/lib/system/WCF.class.php +++ b/wcfsetup/install/files/lib/system/WCF.class.php @@ -807,7 +807,7 @@ class WCF { return self::__callStatic($name, $arguments); } - return $this->$name($arguments); + throw new \BadMethodCallException("Call to undefined method WCF::{$name}()."); } /** -- 2.20.1