Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:82012 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62101 invoked from network); 6 Feb 2015 04:49:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Feb 2015 04:49:05 -0000 Authentication-Results: pb1.pair.com smtp.mail=jrbasso@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jrbasso@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.179 as permitted sender) X-PHP-List-Original-Sender: jrbasso@gmail.com X-Host-Fingerprint: 209.85.213.179 mail-ig0-f179.google.com Received: from [209.85.213.179] ([209.85.213.179:40622] helo=mail-ig0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/A3-45146-FB744D45 for ; Thu, 05 Feb 2015 23:49:04 -0500 Received: by mail-ig0-f179.google.com with SMTP id l13so5431643iga.0 for ; Thu, 05 Feb 2015 20:49:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=SGhm2nymsJ4dtZey8WArVYFQIdegngql5IrrtqSyDdo=; b=f+jKl3nUC/Iq2Rbkdi7yRUQHcOIy0gF00WDDBDDbFXT6nCadr96KqHFf7J6Tqh6wWk 1hkZogvIFkQWdv08ZwZDZ0PnQ/oaf7MhH0LY+ZtAYepunSblo/yLnhCC4kOQlL2HNZaJ h758EnY+KiF0X7AcBrNGsZloBW5m0J/53zVomNAKbmdoZgwtqCQYI1veHrZqhNHhF9P9 VWJZzsSigpPN0L7bkvgY4GA0EfrPORdCAqihRWKvj42qcCVGjWWljhDwY1+ky/QtmVkS Uy6mJurBrwc557dsh60SJnx+Paa0JWRRswrv04zf94eSeitsM2TywdSYVKQgw14zOOfp Sxbw== MIME-Version: 1.0 X-Received: by 10.51.16.1 with SMTP id fs1mr439439igd.8.1423198140619; Thu, 05 Feb 2015 20:49:00 -0800 (PST) Received: by 10.64.25.114 with HTTP; Thu, 5 Feb 2015 20:49:00 -0800 (PST) In-Reply-To: <54D3A8A1.70700@gmail.com> References: <54D3A8A1.70700@gmail.com> Date: Thu, 5 Feb 2015 23:49:00 -0500 Message-ID: To: Stanislav Malyshev Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a1135e68c9de483050e6423c1 Subject: Re: [PHP-DEV] Re: Serialize generating corrupted data From: jrbasso@gmail.com (Juan Basso) --001a1135e68c9de483050e6423c1 Content-Type: text/plain; charset=UTF-8 Hi, Thanks for the feedback. I opened the pull request (https://github.com/php/php-src/pull/1057). Is that correct? On Thu, Feb 5, 2015 at 12:30 PM, Stanislav Malyshev wrote: > Hi! > > >> I can try to make a patch to solve it, but before that I would like how > >> the behavior should be. Some options: > >> 1) Give the notice saying the field doesn't exist and do not include on > >> the serialized response > >> 2) Give the notice saying the field doesn't exist and convert the value > to > >> string (ie, on my example the int(1) would be transformed to string(1)) > > I'd try (2) if it doesn't work (which probably would be the case unless > your object happens to have property named "42" somehow) then produce a > notice and omit it. If __sleep returns wrong value completely - e.g. > false, I'd produce a warning and serialize it as null. > -- > Stas Malyshev > smalyshev@gmail.com > --001a1135e68c9de483050e6423c1--