Skip to content

fix: Cast value to string in validation check#17376

Open
wojtekojtek wants to merge 1 commit intonextcloud:mainfrom
wojtekojtek:main
Open

fix: Cast value to string in validation check#17376
wojtekojtek wants to merge 1 commit intonextcloud:mainfrom
wojtekojtek:main

Conversation

@wojtekojtek
Copy link

Fixes exception:
Exception preg_match(): Argument #2 ($subject) must be of type string, false given in file '/var/www/html/nextcloud/apps/spreed/lib/MatterbridgeManager.php' line 505

validateParts() iterates over all keys/values of each bridge part and calls
preg_match() on them directly. Boolean fields like skiptls (which is false
by default) are not cast to string first, causing a fatal exception that
prevents any bridge config from being saved.

☑️ Resolves

🛠️ API Checklist

🚧 Tasks

  • ...

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

Fixes exception:
Exception preg_match(): Argument nextcloud#2 ($subject) must be of type string, false given in file '/var/www/html/nextcloud/apps/spreed/lib/MatterbridgeManager.php' line 505

Signed-off-by: wojtekojtek <49075395+wojtekojtek@users.noreply.github.com>
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.

Can't add MatterBridge to conversation

1 participant