Error Detected:
Symfony\Component\HttpFoundation\Cookie::__construct(): Argument #2 ($value) must be of type ?string, array given
This error occurs when CSRF token handling has issues with cookie values.
Quick Fixes:
Clears session and regenerates CSRF token
Instructions to clear browser cache/cookies
Test the form after clearing
Run debug tests
Manual Steps if Automated Fix Doesn't Work:
- Clear Browser Cache: Ctrl+Shift+Delete → Clear all data
- Close all browser tabs for this site
- Restart browser
- Try form again: /api-sources/create
Root Cause:
CSRF token cookie is receiving an array value instead of string. This usually happens when:
- Session data corruption
- Browser cache issues
- Multiple Laravel sessions conflict
- Cookie handling problems