Page MenuHomePhorge

PHP Warning: implode(): Invalid arguments passed
ClosedPublic

Authored by vanmeeuwen on Jul 3 2017, 11:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 5:12 AM
Unknown Object (File)
Mar 17 2024, 3:47 AM
Unknown Object (File)
Feb 25 2024, 10:39 PM
Unknown Object (File)
Feb 1 2024, 2:17 PM
Unknown Object (File)
Jan 21 2024, 1:04 PM
Unknown Object (File)
Jan 19 2024, 7:02 PM
Unknown Object (File)
Jan 17 2024, 2:07 PM
Unknown Object (File)
Jan 16 2024, 11:25 PM
Subscribers

Details

Summary

A first attempt to fix the following warning:

PHP Warning:  implode(): Invalid arguments passed in /usr/share/kolab-syncroton/lib/kolab_sync_data.php on line 752
Test Plan

None

Diff Detail

Repository
rS syncroton
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This way you can end up with true. I'd rather make sure $relation['members'] is an array. e.g.

'members' => implode("\n", (array) $relation['members']),
This revision now requires changes to proceed.Jul 3 2017, 11:22 AM
vanmeeuwen edited edge metadata.
  • Ensure $relation['members'] is an array
In D455#5366, @machniak wrote:

This way you can end up with true. I'd rather make sure $relation['members'] is an array. e.g.

'members' => implode("\n", (array) $relation['members']),

If $relation['members'] is a string though, converting it to an array would void the validity, right?

I thought that

'members' => empty($relation['members']) ?: implode("\n", $relation['members']),

would end up with 'members' => null, but I see your point.

This revision is now accepted and ready to land.Jul 3 2017, 11:54 AM
This revision was automatically updated to reflect the committed changes.