Switch to LOCK IN SHARE MODE in recordUpload2()
[lhc/web/wiklou.git] / includes / Status.php
index 2a9d173..0a8062c 100644 (file)
@@ -159,6 +159,15 @@ class Status {
                $this->ok = false;
        }
 
+       /**
+        * Don't save the callback when serializing, because Closures can't be
+        * serialized and we're going to clear it in __wakeup anyway.
+        */
+       public function __sleep() {
+               $keys = array_keys( get_object_vars( $this ) );
+               return array_diff( $keys, array( 'cleanCallback' ) );
+       }
+
        /**
         * Sanitize the callback parameter on wakeup, to avoid arbitrary execution.
         */