Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95152 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71428 invoked from network); 14 Aug 2016 22:15:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Aug 2016 22:15:03 -0000 Authentication-Results: pb1.pair.com smtp.mail=danack@basereality.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=danack@basereality.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain basereality.com from 209.85.217.172 cause and error) X-PHP-List-Original-Sender: danack@basereality.com X-Host-Fingerprint: 209.85.217.172 mail-ua0-f172.google.com Received: from [209.85.217.172] ([209.85.217.172:32868] helo=mail-ua0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8B/14-36656-56DE0B75 for ; Sun, 14 Aug 2016 18:15:02 -0400 Received: by mail-ua0-f172.google.com with SMTP id 74so51930997uau.0 for ; Sun, 14 Aug 2016 15:15:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=2zhh5YAkdUV+OUD0FHEKT9jyLvROR0rJsXd2WkelJ1w=; b=0/rAajyIfltrtfDetwq3Gdloxrs/3azJLcTmDEftmd+n9RME9mqAo+WSF4x/4OOE8g vpWU/klUKaNoLQ4X8GMO0UGzweN/S+qcm+7Fey/FUbxbbw8FMJBQG6Yoe8HK2Zy3CB9u b0/6c0fqYX5f31zSvmAufvRCYPJl+ff2YlgJt+jajuDClug5YpRD/a4p9uKTmcha1oDB e9YRJh+zF9zU+u81oWkGmNgrwTkn810PanCVDOyIjzweYPOEV5zeZGAwAx64kXX1lTK3 ZOi6ZmYeWuHbLoIVwXqZe4I9ioSp9SZxkfb6uJ0O0L5q23rMbZWFrm7AtWk2Yiz8C+ZZ MYYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=2zhh5YAkdUV+OUD0FHEKT9jyLvROR0rJsXd2WkelJ1w=; b=a3kLUuZBmRYoYa2k/iaiBuMAGa6sgZI7vc6wFZp0fVRE5M9i/d2K/FN1NHL0EY/vyP R9jEVfrhLA0f8g69PiluOf6fXM/C2LaErhUfndSGkZU8ApYdRLi7Ro3DIaijmZirfzM0 VQmQEJBtjecBAWRNeheyXlOga3nMFOZUpl6ZaZHqcO29vPVdJdwIeiRi44wRH+MVFiq8 OhRsMpmQigig+8j6JLzQ+cJeNDY55on3gF5vIfImuqUxYZTjYnSXFAO6aEZ83qCDqDPw YS7izot50w40n+DGzDl+RjBIdrdTJ9++ZYUSPr07wT6RO4R1sBcJZfnqJp5VL0DBi7+P 0i0A== X-Gm-Message-State: AEkoouso7uGOVcp7ZHe+arlFAF6+hTCR9tmANBiLmrmGhAmMNUc7ml83hIpzT4Gv5R0x0OVyDZnjHbx7yl61bw== X-Received: by 10.159.39.33 with SMTP id a30mr11816544uaa.33.1471212899246; Sun, 14 Aug 2016 15:14:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.69.4 with HTTP; Sun, 14 Aug 2016 15:14:58 -0700 (PDT) X-Originating-IP: [78.145.253.19] In-Reply-To: References: Date: Sun, 14 Aug 2016 23:14:58 +0100 Message-ID: To: Stanislav Malyshev Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] get_class() disallow null parameter From: danack@basereality.com (Dan Ackroyd) On 14 August 2016 at 22:48, Stanislav Malyshev wrote: > > Could you please clarify what you mean by "disallow"? It will be the standard behaviour for accepting params. The patch is just: - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|o!", &obj) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|o", &obj) == FAILURE) { but I have added a clear description to the RFC: > If get_class() is called with null as the parameter, a warning will be emitted: > > Warning: get_class() expects parameter 1 to be object, null given in %s on line %d cheers Dan