|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
9 + 1 = ?
Subscribe to this entry?

 [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: Thu Feb 22 10:01:28 2024 UTC