-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent "Parameter must be scalar" error when creating a calendar event #2
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@nathangray Can you have a look at that pull request. Ralf |
Is there any difference between wrapping that whole thing in an if as compared to something like |
No, does the same thing and does not indent the whole thing further. @nathangray Please go ahead, implement that and close the PR. |
Implemented, thanks @sbourget |
ralfbecker
added a commit
that referenced
this pull request
Apr 10, 2017
ralfbecker
added a commit
that referenced
this pull request
Apr 10, 2017
Lankaster
added a commit
to Lankaster/egroupware
that referenced
this pull request
Jan 4, 2019
Error examples: [Thu Jan 03 13:11:34.043522 2019] [:error] [pid 18181] [client 192.168.1.100:38306] PHP Warning: array_intersect(): Argument EGroupware#2 is not an array in /usr/share/egroupware/calendar/inc/class.calendar_groupdav.inc.php on line 818, referer: http://egroupware/egroupware/groupdav.php/ABC/calendar/ [Thu Jan 03 13:59:41.125066 2019] [:error] [pid 18364] [client 192.168.1.100:40350] PHP Warning: Invalid argument supplied for foreach() in /usr/share/egroupware/api/src/Etemplate/Widget/Nextmatch.php on line 314, referer: http://egroupware/egroupware/index.php?cd=yes
Closed
This was referenced Mar 5, 2019
ralfbecker
added a commit
that referenced
this pull request
Oct 5, 2021
ralfbecker
added a commit
that referenced
this pull request
Oct 5, 2021
ralfbecker
added a commit
that referenced
this pull request
Oct 7, 2021
…f type array, null given" when creating a category
ralfbecker
added a commit
that referenced
this pull request
Oct 7, 2021
…f type array, null given" when creating a category
nathangray
added a commit
that referenced
this pull request
Oct 13, 2021
…must be of type array, null given"
nathangray
added a commit
that referenced
this pull request
Oct 14, 2021
…must be of type array, null given"
nathangray
added a commit
that referenced
this pull request
Oct 22, 2021
…ust be of type array, null given"
nathangray
added a commit
that referenced
this pull request
Oct 22, 2021
…ust be of type array, null given"
ralfbecker
added a commit
that referenced
this pull request
Jan 25, 2023
…must be of type array, bool given
ralfbecker
added a commit
that referenced
this pull request
Feb 6, 2023
ralfbecker
added a commit
that referenced
this pull request
Apr 27, 2023
… than or equal to 0 fixes 1894a19
ralfbecker
added a commit
that referenced
this pull request
Apr 27, 2023
… than or equal to 0 fixes 1894a19
ralfbecker
added a commit
that referenced
this pull request
May 25, 2023
ralfbecker
added a commit
that referenced
this pull request
May 25, 2023
ralfbecker
added a commit
that referenced
this pull request
Jun 16, 2023
nathangray
pushed a commit
that referenced
this pull request
Aug 22, 2023
nathangray
pushed a commit
that referenced
this pull request
Aug 22, 2023
nathangray
added a commit
that referenced
this pull request
Oct 11, 2023
calendar_uiforms::event_changed(): Argument #2 ($_old) must be of type array, bool given, called in /var/www/epl-23.1/calendar/inc/class.calendar_uiforms.inc.php on line 2295
nathangray
added a commit
that referenced
this pull request
Oct 12, 2023
calendar_uiforms::event_changed(): Argument #2 ($_old) must be of type array, bool given, called in /var/www/epl-23.1/calendar/inc/class.calendar_uiforms.inc.php on line 2295
nathangray
added a commit
that referenced
this pull request
Oct 16, 2023
…tation calendar_uiforms::event_changed(): Argument #2 ($_old) must be of type array, bool given, called in /var/www/epl-23.1/calendar/inc/class.calendar_uiforms.inc.php on line 2295
nathangray
added a commit
that referenced
this pull request
Oct 16, 2023
…tation calendar_uiforms::event_changed(): Argument #2 ($_old) must be of type array, bool given, called in /var/www/epl-23.1/calendar/inc/class.calendar_uiforms.inc.php on line 2295
ralfbecker
added a commit
that referenced
this pull request
Oct 30, 2023
…DAP\Result, bool given (0)
ralfbecker
added a commit
that referenced
this pull request
Oct 30, 2023
…DAP\Result, bool given (0)
nathangray
added a commit
that referenced
this pull request
Mar 11, 2024
nathangray
added a commit
that referenced
this pull request
Mar 12, 2024
ralfbecker
added a commit
that referenced
this pull request
Apr 3, 2024
ralfbecker
added a commit
that referenced
this pull request
Apr 3, 2024
ralfbecker
added a commit
that referenced
this pull request
Sep 11, 2024
…when trying to create a new iCal Import profile for Infolog
ralfbecker
added a commit
that referenced
this pull request
Sep 11, 2024
…when trying to create a new iCal Import profile for Infolog
ralfbecker
added a commit
that referenced
this pull request
Nov 6, 2024
…t be of type ?array, int given
ralfbecker
added a commit
that referenced
this pull request
Nov 6, 2024
…t be of type ?array, int given
ralfbecker
added a commit
that referenced
this pull request
Nov 29, 2024
ralfbecker
added a commit
that referenced
this pull request
Nov 29, 2024
ralfbecker
added a commit
that referenced
this pull request
Dec 4, 2024
ralfbecker
added a commit
that referenced
this pull request
Dec 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In version 16.1.20160715 when a user creates a calendar event, it fails with the following error in the apache logs (Apache 2.4.23, PHP 7.0.8):
An error happened (EGroupware\Api\Exception\WrongParameter): calendar_bo::resource_info(NULL) parameter must be scalar, referer: https://egroupware.XXXX.org/index.php?menuaction=calendar.calendar_uiforms.edit&date=20160719&hour=7&minute=30&owner[]=11
#0 C:\Web\sites\egroupware\calendar\inc\class.calendar_uiforms.inc.php(422): calendar_bo->resource_info(NULL), referer: https://egroupware.XXXX.org/index.php?menuaction=calendar.calendar_uiforms.edit&date=20160719&hour=7&minute=30&owner[]=11
#1 C:\Web\sites\egroupware\api\src\loader\deprecated_factory.php(191): calendar_uiforms->process_edit(Array), referer: https://egroupware.XXXX.org/index.php?menuaction=calendar.calendar_uiforms.edit&date=20160719&hour=7&minute=30&owner[]=11
#2 C:\Web\sites\egroupware\api\src\Etemplate.php(366): ExecMethod(Array, Array), referer: https://egroupware.XXXX.org/index.php?menuaction=calendar.calendar_uiforms.edit&date=20160719&hour=7&minute=30&owner[]=11
#3 [internal function]: EGroupware\Api\Etemplate::ajax_process_content('calendar_egroup...', Array, ''), referer: https://egroupware.sau19.org/index.php?menuaction=calendar.calendar_uiforms.edit&date=20160719&hour=7&minute=30&owner[]=11
C:\Web\sites\egroupware\api\src\Json\Request.php(179): call_user_func_array(Array, Array), referer: https://egroupware.XXXX.org/index.php?menuaction=calendar.calendar_uiforms.edit&date=20160719&hour=7&minute=30&owner[]=11
#5 C:\Web\sites\egroupware\api\src\Json\Request.php(91): EGroupware\Api\Json\Request->handleRequest('EGroupware\Api\...', Array), referer: https://egroupware.XXXX.org/index.php?menuaction=calendar.calendar_uiforms.edit&date=20160719&hour=7&minute=30&owner[]=11
#6 C:\Web\sites\egroupware\json.php(119): EGroupware\Api\Json\Request->parseRequest('EGroupware\Api\...', '{"request":{"pa...'), referer: https://egroupware.XXXX.org/index.php?menuaction=calendar.calendar_uiforms.edit&date=20160719&hour=7&minute=30&owner[]=11
#7 {main}, referer: https://egroupware.XXXX.org/index.php?menuaction=calendar.calendar_uiforms.edit&date=20160719&hour=7&minute=30&owner[]=11
Instance=default, User=egroupware, Request=POST https://egroupware.XXXX.org/json.php?menuaction=EGroupware\\Api\\Etemplate::ajax_process_content, User-agent=Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0, referer: https://egroupware.XXXX.org/index.php?menuaction=calendar.calendar_uiforms.edit&date=20160719&hour=7&minute=30&owner[]=11
This occurs because the $participant has a value of null during one of the iterations of the foreach loop. This patch simply checks to see if there is a value before executing the code within the loop.