Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35069 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29887 invoked by uid 1010); 1 Feb 2008 19:39:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 29872 invoked from network); 1 Feb 2008 19:39:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Feb 2008 19:39:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.187 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.198.187 rv-out-0910.google.com Received: from [209.85.198.187] ([209.85.198.187:39992] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DF/CB-31091-68573A74 for ; Fri, 01 Feb 2008 14:39:54 -0500 Received: by rv-out-0910.google.com with SMTP id k15so817096rvb.23 for ; Fri, 01 Feb 2008 11:39:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=YwB4gy9OQSVcjrUEn6z7ujIIRyAXg1oaaCzK73PqKKs=; b=hBxm3vnxszrTZcEG77OXP6Fb/7tJZ0jeidbS1c2PmzKnte1raFU3pu6WtwGQwlwBwSd0K1CKMTVvGk/aXyuBWKY6BIUfOz+tFgKDob+HExJfqTHzwdt0/4plNTP603HIHiPlMl3QTFwX3lBGc2wghQ8toZ70UugDXzcItfLAglg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=BoIVu4D5OX2wbhXiF4qSNa53zYieG+bVF4Mk/QTVpUE4e80oQ2MKV2jg0QUH9yDXWhAfMsfb6DCuESEndAFYvuRCgljHu09k38IZriWfZRjtzLnIfNrNw/1/lcz9944yUK1R7qy82CV5WtPiKbc0dAqjDRJV1FTfj0GiD3Xo0jw= Received: by 10.141.161.6 with SMTP id n6mr2769777rvo.41.1201894778493; Fri, 01 Feb 2008 11:39:38 -0800 (PST) Received: by 10.141.151.21 with HTTP; Fri, 1 Feb 2008 11:39:38 -0800 (PST) Message-ID: Date: Fri, 1 Feb 2008 20:39:38 +0100 To: "Cristian Rodriguez" Cc: php-dev In-Reply-To: <7d5a202f0802011113x3d141a9fqc577f051b35e6d6b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <479A60BA.7030905@zend.com> <7d5a202f0802011113x3d141a9fqc577f051b35e6d6b@mail.gmail.com> Subject: Re: [PHP-DEV] json_encode() bug From: pierre.php@gmail.com ("Pierre Joye") On Feb 1, 2008 8:13 PM, Cristian Rodriguez wrote: > 2008/1/25, Stanislav Malyshev : > > > Now this is an easy fix but would lead to bad strings silently converted > > to empty strings. The question is - should we have an error there? If > > so, which one - E_WARNING, E_NOTICE? I'm for E_WARNING. > > Yes , E_WARNING is the right thing to have IMHO. Stupid question, who actually checks for E_* in his code at runtime after having called such functions? Not me and I would hate to. It sounds to me like a perfect exception use case. As this function can return nearly everything scalar we have (boolean, string, null, integer,...) we can't use our normal "returns FALSE on failure". Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org