Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:2534 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7509 invoked from network); 22 Jun 2003 13:30:29 -0000 Received: from unknown (HELO tabini.ca) (198.63.211.18) by pb1.pair.com with SMTP; 22 Jun 2003 13:30:29 -0000 Received: from cpe0050ba4130cb-cm013439900542.cpe.net.cable.rogers.com ([24.156.157.246] helo=mbe) by tabini.ca with asmtp (TLSv1:RC4-MD5:128) (Exim 4.20) id 19U4tm-0001mm-Lz for internals@lists.php.net; Sun, 22 Jun 2003 08:28:50 -0500 To: internals@lists.php.net In-Reply-To: <1056287234.3325.38.camel@mbe> References: <1056287234.3325.38.camel@mbe> Content-Type: text/plain Organization: Marco Tabini & Associates, Inc. Message-ID: <1056288568.3325.43.camel@mbe> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 22 Jun 2003 09:29:28 -0400 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Bug #24281 From: marcot@tabini.ca (Marco Tabini) Take two (this time hopefully clearing the variable before resetting it): Index: string.c =================================================================== RCS file: /repository/php4/ext/standard/string.c,v retrieving revision 1.391 diff -u -r1.391 string.c --- string.c 20 Jun 2003 15:41:43 -0000 1.391 +++ string.c 22 Jun 2003 13:29:22 -0000 @@ -3194,7 +3194,8 @@ php_str_replace_in_subject(*search, *replace, subject, return_value, case_sensitivity, (argc > 3) ? &count : NULL); } if (argc > 3) { - Z_LVAL_PP(zcount) = count; + zval_dtor(*zcount); + ZVAL_LONG(*zcount, count); } } /* }}} */