|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10501 array_sumn causes segfault when used with unset vars
Submitted: 2001-04-25 20:12 UTC Modified: 2001-04-25 20:58 UTC
From: lee at mediawaveonline dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.4pl1 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: lee at mediawaveonline dot com
New email:
PHP Version: OS:


 [2001-04-25 20:12 UTC] lee at mediawaveonline dot com
  $result = array_sum($test);

causes a seg fault because $test is not set. no error is given in the log files or on screen. only apache's error_log shows a segfault.

Chris Lee


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-25 20:58 UTC]
this is fixed in CVS, wait for 4.0.5

$ ./php
  $result = array_sum($test);

X-Powered-By: PHP/4.0.5RC6
Content-type: text/html

<b>Warning</b>:  The argument to array_sum() should be an array in <b>-</b> on line <b>3</b><br>

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Feb 27 00:01:26 2024 UTC