php.net |  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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: lee at mediawaveonline dot com
New email:
PHP Version: OS:

 

 [2001-04-25 20:12 UTC] lee at mediawaveonline dot com
<?php
  $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
lee@mediawaveonline.com

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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

$ ./php
<?php
  $result = array_sum($test);
?>

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


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

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Aug 10 16:01:23 2020 UTC