Title: Request for Official Patch: compareObjects() Causes Fatal Error When Invalid Dat
Last modified: June 18, 2025

---

# Request for Official Patch: compareObjects() Causes Fatal Error When Invalid Dat

 *  [Fixmysite](https://wordpress.org/support/users/newtlabs/)
 * (@newtlabs)
 * [11 months, 4 weeks ago](https://wordpress.org/support/topic/request-for-official-patch-compareobjects-causes-fatal-error-when-invalid-dat/)
 * Hi Zapier team,
 * We’ve encountered a fatal error with the Zapier for WordPress plugin (v1.5.2)
   related to the `compareObjects()` method in `zapier.php`.
 * **Error details:**
 * `Uncaught ReflectionException: Class "0" does not exist in /wp-content/plugins/
   zapier/zapier.php on line 390`
 * This happens when `compareObjects()` is called with unexpected or invalid data
   types (e.g., a string instead of an object), specifically at this line:
 * `$reflect1 = new ReflectionClass($obj1);`
 * In our case, the plugin had become deactivated or corrupted, leading to `$obj1`
   being a string value like `"0"`, which causes a fatal `ReflectionException`.
 * **Proposed fix:**
 * To make the plugin more robust and prevent complete site crashes, we recommend
   adding a type check before attempting to create `ReflectionClass` instances:
 * `private function compareObjects($obj1, $obj2) {
   if (!is_object($obj1) || !is_object(
   $obj2)) {return []; // Or log/throw if needed}$reflect1 = new ReflectionClass(
   $obj1);$reflect2 = new ReflectionClass($obj2);...}
 * We’d appreciate it if this fix could be included in the next official release
   to prevent similar issues for other users. Let us know if you need more details
   or logs.
 * Thanks for your help and for maintaining this plugin!

The topic ‘Request for Official Patch: compareObjects() Causes Fatal Error When 
Invalid Dat’ is closed to new replies.

 * ![](https://ps.w.org/zapier/assets/icon.svg?rev=3043272)
 * [Zapier for WordPress](https://wordpress.org/plugins/zapier/)
 * [Support Threads](https://wordpress.org/support/plugin/zapier/)
 * [Active Topics](https://wordpress.org/support/plugin/zapier/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/zapier/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/zapier/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Fixmysite](https://wordpress.org/support/users/newtlabs/)
 * Last activity: [11 months, 4 weeks ago](https://wordpress.org/support/topic/request-for-official-patch-compareobjects-causes-fatal-error-when-invalid-dat/)
 * Status: not resolved