Join GitHub today
buffer: fix backwards incompatibility #12439
4a86803 introduced a backwards incompatibility by accident and was not caught due to an existing test that wasn't strict enough.
This commit fixes both the backwards incompatibility and the test.
This changes does not affect performance.
Affected core subsystem(s)
I'm not opposed to this, but I want to suggest the possibility that we only want this on v7.x and earlier. I'm not sure it makes a lot of sense to have two different error messages for an invalid encoding, so the accidental removal of one of them in 4a86803 arguably makes the error messages better/more consistent and we might as well do it in 8.x.x and forward.
I say "arguably" because you could make the case that the one that specifically says "string" is better, and I suspect someone might make that argument. :-D