Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:74975 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6172 invoked from network); 18 Jun 2014 09:05:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jun 2014 09:05:52 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.53 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.192.53 mail-qg0-f53.google.com Received: from [209.85.192.53] ([209.85.192.53:32873] helo=mail-qg0-f53.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 68/66-01877-E6651A35 for ; Wed, 18 Jun 2014 05:05:50 -0400 Received: by mail-qg0-f53.google.com with SMTP id i50so463864qgf.12 for ; Wed, 18 Jun 2014 02:05:47 -0700 (PDT) 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=3tqxUP9XVFRSPbtpvN9sE+Ji00ezFPJTz8cOekwvnK8=; b=Zha+gQcSPmTFlke102OM2mmIFJv8eTGIeU3VN+varwi92jY1ziZa4Wa8d9AOJDD+2P fYRQlgf9/HQqDuKRXPIOx01CXT6MSoMWmx2e8zncacCj7ifY3NtYdKRVyfp1s8iIGsqe Ru+o53oUC8Rw2q4FmKZFj4SfP3wvVdlstA9NaFl0XLfJLgtTSSvuM2Tnu1kobAFGoriN bkNmhckCO1BvNEqkcLezTrFeAXD2Sqb2WANayZnFTCRdG1JwBvg3P9R1x15I1WDR9FZy pJxRGqqzx0fqld21j5hBNPK40zP7dRHNlJnaso3zPs9ui+dxbzKK0V9woXsiy9b/6+tQ y2uw== MIME-Version: 1.0 X-Received: by 10.140.27.23 with SMTP id 23mr831953qgw.94.1403082346911; Wed, 18 Jun 2014 02:05:46 -0700 (PDT) Received: by 10.140.17.77 with HTTP; Wed, 18 Jun 2014 02:05:46 -0700 (PDT) In-Reply-To: <53A14AB7.4090501@php.net> References: <53A0C6DD.50705@sugarcrm.com> <53A14AB7.4090501@php.net> Date: Wed, 18 Jun 2014 11:05:46 +0200 Message-ID: To: Remi Collet Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a11c14a7ce0de4b04fc1890d4 Subject: Re: [PHP-DEV] Problems with the fix for the BC break introduced in 5.4.29 and 5.5.13 From: tyra3l@gmail.com (Ferenc Kovacs) --001a11c14a7ce0de4b04fc1890d4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Jun 18, 2014 at 10:15 AM, Remi Collet wrote: > Le 18/06/2014 10:03, Ferenc Kovacs a =C3=A9crit : > > >> 2. The following fix allowed this behavior for user classes. > >> > > > > yes > > Hmm... do you refer to > > http://git.php.net/?p=3Dphp-src.git;a=3Dpatch;h=3D20568e502814fffc41d91a2= 2edaf75ff5ae19d5c > > I think this allow to unserialize "O:.." for "internal" classes. > allows unserialize "O:" for userland classes implementing Serializable(even if that userland class extends an internal class): [tyrael@ferencs-mbp-135 php-src.git (PHP-5.5 =E2=9C=97)]$ ./sapi/cli/php -v PHP 5.5.15-dev (cli) (built: Jun 17 2014 15:33:34) (DEBUG) Copyright (c) 1997-2014 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies [tyrael@ferencs-mbp-135 php-src.git (PHP-5.5 =E2=9C=97)]$ ./sapi/cli/php -r "var_dump(unserialize('O:11:\"ArrayObject\":0:{}'));class MyArrayObject extends ArrayObject{};var_dump(unserialize('O:13:\"MyArrayObject\":0:{}'));= " Warning: Erroneous data format for unserializing 'ArrayObject' in Command line code on line 1 bool(false) object(MyArrayObject)#1 (1) { ["storage":"ArrayObject":private]=3D> array(0) { } } > > As for user land classes, we have newInstanceWithoutConstructor. > > yes, but that also considers any class extending/implementing an internal class/interface as internal. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --001a11c14a7ce0de4b04fc1890d4--