Skip to content

Commit

Permalink
Replace gp_endswith() with working implementation
Browse files Browse the repository at this point in the history
In [22349] we introduced a call to gp_endswith(),
whcih doesn't exist in WordPress, only in GlotPress.

See #22337


git-svn-id: http://core.svn.wordpress.org/trunk@22350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
nb committed Oct 31, 2012
1 parent dcc0729 commit 8a2548a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wp-includes/pomo/po.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ function read_line($f, $action = 'read') {
return true;
}
$line = $use_last_line? $last_line : fgets($f);
$line = gp_endswith( $line, "\r\n" )? rtrim( $line, "\r\n" ) . "\n" : $line;
$line = ( "\r\n" == substr( $line, -2 ) ) ? rtrim( $line, "\r\n" ) . "\n" : $line;
$last_line = $line;
$use_last_line = false;
return $line;
Expand All @@ -381,4 +381,4 @@ function trim_quotes($s) {
return $s;
}
}
endif;
endif;

0 comments on commit 8a2548a

Please sign in to comment.