Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13021 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19076 invoked by uid 1010); 27 Sep 2004 18:34:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 17753 invoked from network); 27 Sep 2004 18:33:53 -0000 Received: from unknown (HELO outbound.mailhop.org) (63.208.196.171) by pb1.pair.com with SMTP; 27 Sep 2004 18:33:53 -0000 Received: from ip172.legends-river-oaks.slc.ygnition.net ([66.199.115.172] helo=dmcentral.com) by outbound.mailhop.org with esmtpa (Exim 4.42) id 1CC0Js-000IKD-Hs; Mon, 27 Sep 2004 14:33:52 -0400 Received: from hans (vulcan.americom.com [208.187.207.195]) by dmcentral.com (Postfix) with ESMTP id 418E6E1744; Mon, 27 Sep 2004 11:41:10 -0700 (MST) Message-ID: <004201c4a4c0$8b1bfd80$2c02a8c0@hans> To: "Daniel Convissor" Cc: References: <001b01c4a4ba$bf575320$2c02a8c0@hans> <20040927180456.GA17529@panix.com> Date: Mon, 27 Sep 2004 12:33:54 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Mail-Handler: MailHop Outbound by DynDNS.org X-Originating-IP: 66.199.115.172 X-Report-Abuse-To: abuse@dyndns.org (see http://www.mailhop.org/outbound/abuse.html for abuse reporting information) X-MHO-User: zardinuk Subject: Re: [PHP-DEV] return NULL by reference From: jeff@opendbms.com ("Jeffrey Moss") Well I can't reliably reproduce it, is this expected behavior or not? If there is a cleaner solution I'd like to try that first. I'd like to turn off this error altogether even if I have to patch and recompile. I can't see anything like this in the changelogs. Since when should anything not be allowed to return null? -Jeff ----- Original Message ----- From: "Daniel Convissor" To: "Jeffrey Moss" Cc: Sent: Monday, September 27, 2004 12:04 PM Subject: Re: [PHP-DEV] return NULL by reference > On Mon, Sep 27, 2004 at 11:52:24AM -0600, Jeffrey Moss wrote: > > > return NULL; > ... snip ... > > "Only variable references should be returned by reference " > > Just like the error message says. "References" are referring to > variables. NULL isn't a variable. Do this instead: > > $tmp = null; > return $tmp; > > --Dan > > -- > T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y > data intensive web and database programming > http://www.AnalysisAndSolutions.com/ > 4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409