|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2004-03-30 04:32 UTC] btomic at alterbox dot hr
  [2005-02-28 01:28 UTC] wez@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 14:00:01 2025 UTC | 
Description: ------------ If function mailparse_msg_get_part returns its result into variable I get segmentation fault. I use buffer for message sotrage. If I do: mailparse_msg_get_part_data(mailparse_msg_get_part($mail,$st)) then everiting is ok. But problem is whan I do: $section = mailparse_msg_get_part($mail, $st); $info = mailparse_msg_get_part_data($section); Code below send big output I do not know why. Some times code succeeds without error but that are rare cases and output is still there. Reproduce code: --------------- $mail=mailparse_msg_create(); $mbody=$pop->retr(key($list_mess)); mailparse_msg_parse($mail, $mbody); $struc=mailparse_msg_get_structure($mail); foreach($struc as $st){ $temp=mailparse_msg_get_part($mail, $st); mailparse_msg_get_part_data($temp); mailparse_msg_extract_part($temp, $mbody); } mailparse_msg_free($mail); Expected result: ---------------- Nothing, the code should just execute without any output. Actual result: -------------- I get output. It seems to be message. And usually I get segmentation fault in apache error_log file.