Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Update Llk.php #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Llk/Llk.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static function save(Parser $parser, $className)
' \'' . $tokenName . '\' => \'' .
str_replace(
['\'', '\\\\'],
['\\\'', '\\\\\\'],
['\\\'', '\\\\\\\\'],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like dumping of these values must be done via var_export(..., true). Right now it's unsafe and unpredictable.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's fix the bug within the current mechanism first because it's an easy merge. You can open a PR where var_export is used

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, using var_export is not a bad idea at all. And it will simplify the code. Are you willing to try to update with var_export please?

$tokenValue
) . '\',' . "\n";
}
Expand Down