From 2de27684922feaa6f318fe21a35a0734f01c56e5 Mon Sep 17 00:00:00 2001 From: dOoBiX Date: Thu, 26 Sep 2013 09:44:29 -0700 Subject: [PATCH] Initialized an object to get rid of a warning Added $request->ParentFolderIds->DistinguishedFolderId->Mailbox = new StdClass; to fix this Warning: Creating default object from empty value --- EWSWrapper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EWSWrapper.php b/EWSWrapper.php index daac641..8e60412 100644 --- a/EWSWrapper.php +++ b/EWSWrapper.php @@ -485,8 +485,10 @@ public function listItems($type, $id=null, $start=null, $end=null, $on_behalf=nu $request->ParentFolderIds = new EWSType_NonEmptyArrayOfBaseFolderIdsType(); $request->ParentFolderIds->DistinguishedFolderId = new EWSType_DistinguishedFolderIdType(); $request->ParentFolderIds->DistinguishedFolderId->Id = constant("EWSType_DistinguishedFolderIdNameType::".$type); - if($on_behalf) + if($on_behalf) { + $request->ParentFolderIds->DistinguishedFolderId->Mailbox = new StdClass; $request->ParentFolderIds->DistinguishedFolderId->Mailbox->EmailAddress = $on_behalf; + } //make the call //print_r($request); //die();