Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9169 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93827 invoked by uid 1010); 15 Apr 2004 10:51:10 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 93792 invoked from network); 15 Apr 2004 10:51:10 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by pb1.pair.com with SMTP; 15 Apr 2004 10:51:10 -0000 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BE4Sb-00072p-00 for ; Thu, 15 Apr 2004 12:51:09 +0200 Received: from ns1.enidan.ch ([217.8.216.11]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Apr 2004 12:51:09 +0200 Received: from per by ns1.enidan.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Apr 2004 12:51:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Thu, 15 Apr 2004 12:44:20 +0200 Lines: 24 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: ns1.enidan.ch User-Agent: KNode/0.7.2 Sender: news Subject: Re: [PHP-DEV] what is the reasonable thing to with a segfault in php? From: per@computer.org (Per Jessen) Per Jessen wrote: > > $editmain=strcasecmp($_REQUEST['contact'],"main")==0; > //$editbilling=strcasecmp($_REQUEST['contact'],"billing")==0; > //$edittechnical=strcasecmp($_REQUEST['contact'],"technical")==0; > OK, I've now guarded the above with : if ( isset($_REQUEST['contact']) ) { $editmain=strcmp($_REQUEST['contact'],"main")==0; $editbilling=strcmp($_REQUEST['contact'],"billing")==0; $edittechnical=strcasecmp($_REQUEST['contact'],"technical")==0; } and the segfault is gone. Still, a segfault just because I'm using an unset global? And why only on the 2nd or later statement? /Per Jessen, Zurich