Don't open your ex's Facebook profile. A new bug in the Facebook app automatically sends friend requests when you visit a stranger's profile. The problem only existed in the Facebook mobile app.
At the moment Facebook seems to have solved the problem. So you can visit (or watch) strangers' Facebook profiles without consequences.
This error was occurring so quickly that it was very hard to notice. When visiting a stranger's profile, the "Add Friend" button automatically changes to "Pending". There was no warning, popup, or anything else that indicated you sent a friend request. The only way to avoid the bug was to not visit strangers' Facebook profiles.
“We fixed a bug related to a recent app update that caused some Facebook friend requests to be sent incorrectly. We apologize for any inconvenience this may have caused." — representative of Meta
The bug was originally reported on r/Facebook subreddit. We don't know how many people were affected by this bug.