From a8b2ae4f27ffb66bb2c04a63a61770e5e30396a7 Mon Sep 17 00:00:00 2001 From: Vadim Sadokhov Date: Thu, 29 Sep 2022 16:24:58 +0300 Subject: [PATCH 1/2] imporve warning message for uncompered types --- runtime/mixed.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/mixed.inl b/runtime/mixed.inl index 46da3ee106..0fe02366bb 100644 --- a/runtime/mixed.inl +++ b/runtime/mixed.inl @@ -1055,7 +1055,7 @@ int64_t mixed::compare(const mixed &rhs) const { return spaceship(as_array(), rhs.as_array()); } - php_warning("Unsupported operand types for operator < or <= (%s and %s)", get_type_c_str(), rhs.get_type_c_str()); + php_warning("Types \'%s\' and \'%s\' cannot be compared", get_type_c_str(), rhs.get_type_c_str()); return is_array() ? 1 : -1; } From 6ccbecafb8cd4a9d0f97eb97445f8cb366df7dcb Mon Sep 17 00:00:00 2001 From: Vadim Sadokhov Date: Wed, 5 Oct 2022 14:57:24 +0300 Subject: [PATCH 2/2] change warning message --- runtime/mixed.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/mixed.inl b/runtime/mixed.inl index 0fe02366bb..e9917620e2 100644 --- a/runtime/mixed.inl +++ b/runtime/mixed.inl @@ -1055,7 +1055,7 @@ int64_t mixed::compare(const mixed &rhs) const { return spaceship(as_array(), rhs.as_array()); } - php_warning("Types \'%s\' and \'%s\' cannot be compared", get_type_c_str(), rhs.get_type_c_str()); + php_warning("Types \'%s\' and \'%s\' cannot be compared using operators <, <= or ==", get_type_c_str(), rhs.get_type_c_str()); return is_array() ? 1 : -1; }