Hi everyone,
i have some problems when dealing with the imap_fetchstructure function.
Here is the protion of the code in a function call( it is a recursive function also):
function(..........){
$structure=imap_fecthstructure(..........)
.
.
.
$type=$structure->type;
$encoding=$structure->encoding;
}
some of the errors come out listed below:
Array ( [ifsubtype] => 1 [subtype] => PLAIN [ifdescription] => 0 [ifid] => 0 [lines] => 151 [bytes] => 5820 [ifdisposition] => 0 [ifdparameters] => 0 [ifparameters] => 1 [parameters] => Array ( [0] => stdClass Object ( [attribute] => CHARSET [value] => US-ASCII ) ) )
Warning: Undefined property: encoding in c:\program files\apache group\apache\htdocs\myproject\users\email\functions.php on line 144
Warning: Undefined property: encoding in c:\program files\apache group\apache\htdocs\myproject\users\email\functions.php on line 146
Array ( [ifsubtype] => 1 [subtype] => PLAIN [ifdescription] => 0 [ifid] => 0 [lines] => 151 [bytes] => 5820 [ifdisposition] => 0 [ifdparameters] => 0 [ifparameters] => 1 [parameters] => Array ( [0] => stdClass Object ( [attribute] => CHARSET [value] => US-ASCII ) ) [type] => )
Warning: Undefined property: encoding in c:\program files\apache group\apache\htdocs\myproject\users\email\functions.php on line 144
Warning: Undefined property: encoding in c:\program files\apache group\apache\htdocs\myproject\users\email\functions.php on line 146
Array ( [ifsubtype] => 1 [subtype] => PLAIN [ifdescription] => 0 [ifid] => 0 [lines] => 151 [bytes] => 5820 [ifdisposition] => 0 [ifdparameters] => 0 [ifparameters] => 1 [parameters] => Array ( [0] => stdClass Object ( [attribute] => CHARSET [value] => US-ASCII ) ) [type] => ) Array ( [ifsubtype] => 1 [subtype] => PLAIN [ifdescription] => 0 [ifid] => 0 [lines] => 151 [bytes] => 5820 [ifdisposition] => 0 [ifdparameters] => 0 [ifparameters] => 1 [parameters] => Array ( [0] => stdClass Object ( [attribute] => CHARSET [value] => US-ASCII ) ) [type] => )
Warning: Undefined property: encoding in c:\program files\apache group\apache\htdocs\myproject\users\email\functions.php on line 144
To check the errors, i have used the get_object_vars to convert the returned object variable to an array variable. Then i used the print_r() to print out the elements in the array variable.
Can anyone explain why the $structure->type and $structure->encoding is undefined?