Skip to content

Enclose FreeBusyResponse in an array in areAvailable#244

Open
nuggex wants to merge 1 commit intoGarethp:masterfrom
nuggex:FixAreAvailable
Open

Enclose FreeBusyResponse in an array in areAvailable#244
nuggex wants to merge 1 commit intoGarethp:masterfrom
nuggex:FixAreAvailable

Conversation

@nuggex
Copy link
Copy Markdown

@nuggex nuggex commented Mar 15, 2023

In the current master branc areAvailable fails with error
PHP Warning: array_map(): Expected parameter 2 to be an array, object given in ../vendor/garethp/php-ews/src/CalendarAPI.php on line 314

This is due to the second argument to the array_map function not being an array.

@marclaporte
Copy link
Copy Markdown

@kambereBr Can you please evaluate this one? Tks

@kambereBr
Copy link
Copy Markdown

@nuggex the original error has changed due to massive changes in #265

Instead of the previous array_map error, it now shows:

Expected type 'object'. Found 'garethp\ews\API\Message\FreeBusyResponseType[]'.

This message error is currently appearing on lines 307 and 314 (src/CalendarAPI.php)

I suggest:

  1. Rebase against current master to get latest changes from PR Remove all uses of the Magic Methods by regenerating our classes to have concrete implementations instead #265
  2. Update your fix to address the new type mismatch error, not the old array_map issue

Thanks!

@marclaporte
Copy link
Copy Markdown

@nuggex We need you :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants