Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LanguageHelper.php to handle translated text with embedded new lines. #42456

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
Update LanguageHelper.php
Changed bracket position {
  • Loading branch information
BrainforgeUK committed Dec 26, 2023
commit ca171c81eaf460ad1e5d68bc830291cf28a6676e
6 changes: 2 additions & 4 deletions libraries/src/Language/LanguageHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,7 @@ public static function parseIniFile($fileName, $debug = false)
$strings = self::parseMultilineIni(isset($contents) ? $contents : file_get_contents($fileName));
laoneo marked this conversation as resolved.
Show resolved Hide resolved

if ($strings === false) {
if ($debug)
{
if ($debug) {
throw new \RuntimeException($e->getMessage());
}

Expand Down Expand Up @@ -502,8 +501,7 @@ protected static function parseMultilineIni($inifileContents) {
// Found a string with embedded new lines
$nameValuePair = $lineParts[1];

while (++$l<count($lines))
{
while (++$l<count($lines)) {
$line = trim($lines[$l]);

$nameValuePair .= "\n" . $line;
Expand Down