Skip to content
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

strlen() expects parameter 1 to be string, array given #5653

Closed
MissAllSunday opened this issue May 5, 2019 · 3 comments · Fixed by #5680

Comments

@MissAllSunday
Copy link
Contributor

commented May 5, 2019

Logging::truncateArray() should be able to handle multidimensional arrays or skip them gracefully

Type of error: General Error message: 2: strlen() expects parameter 1 to be string, array given File: /var/www/html/Sources/Logging.php Line: 33

@MissAllSunday MissAllSunday added this to the RC3 milestone May 5, 2019
@albertlast

This comment has been minimized.

Copy link
Collaborator

commented May 6, 2019

Would you want to skip this or
using implode to convert the array to a string?

@Sesquipedalian

This comment has been minimized.

Copy link
Member

commented May 7, 2019

I'd use json_encode to handle them.

@MissAllSunday

This comment has been minimized.

Copy link
Contributor Author

commented May 13, 2019

Whatever works for you but I'll go a step further and move that function to Subs.php where it can be used by others.

MissAllSunday added a commit to MissAllSunday/SMF2.1 that referenced this issue May 25, 2019
Signed-off-by: Jessica González <suki@missallsunday.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.