- Fixed leak on error in popen/exec (and related functions on Windows. (Pierre)
+- Fixed bug #49361 (wordwrap() wraps incorrectly on end of line boundaries).
+ (Ilia, code-it at mail dot ru)
- Fixed bug #49289 (bcmath module doesn't compile with phpize configure).
(Jani)
- Fixed bug #49286 (php://input (php_stream_input_read) is broken). (Jani)
laststart = lastspace = 0;
for (current = 0; current < textlen; current++) {
if (text[current] == breakchar[0]) {
- laststart = lastspace = current;
+ laststart = lastspace = current + 1;
} else if (text[current] == ' ') {
if (current - laststart >= linelength) {
newtext[current] = breakchar[0];