| | |
| | | return false; |
| | | } |
| | | |
| | | $struct = &$this->_structure_part($structure); |
| | | $struct = &$this->_structure_part($structure, 0, '', $headers); |
| | | $struct->headers = get_object_vars($headers); |
| | | |
| | | // don't trust given content-type |
| | |
| | | $struct->charset = $struct->ctype_parameters['charset']; |
| | | } |
| | | |
| | | // #1487700: workaround for lack of charset in malformed structure |
| | | if (empty($struct->charset) && !empty($mime_headers) && $mime_headers->charset) { |
| | | $struct->charset = $mime_headers->charset; |
| | | } |
| | | |
| | | // read content encoding |
| | | if (!empty($part[5]) && $part[5]!='NIL') { |
| | | $struct->encoding = strtolower($part[5]); |