diff --git a/wp-includes/pomo/po.php b/wp-includes/pomo/po.php index 1fc8a469d2..c31c7627df 100644 --- a/wp-includes/pomo/po.php +++ b/wp-includes/pomo/po.php @@ -169,7 +169,7 @@ class PO extends Gettext_Translations { public static function prepend_each_line($string, $with) { $lines = explode("\n", $string); $append = ''; - if ('' === end($lines)) { + if ("\n" === substr($string, -1) && '' === end($lines)) { // Last line might be empty because $string was terminated // with a newline, remove it from the $lines array, // we'll restore state by re-terminating the string at the end diff --git a/wp-includes/version.php b/wp-includes/version.php index 74a1289a5d..9b9c5dc5fa 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-39591'; +$wp_version = '4.8-alpha-39592'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.