You shouldn’t change serialised PHP data structures directly.
Serialised data contains the length of each value, and by changing a section of text, that length is no longer correct, and PHP runs into a fatal error and crashes.
I don’t know what you are doing, but you should not modify serialised PHP strings manually.