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
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Wed Oct 30 22:01:28 2024 UTC