Skip to content

Commit 4a06bee

Browse files
author
Jason Gilmore
committed
DF-8273 fix
1 parent 266fd34 commit 4a06bee

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

src/Engines/Python.php

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,34 @@ public function __construct(array $settings = [])
3535
protected function enrobeScript($script, array &$data = [], array $platform = [])
3636
{
3737
$jsonEvent = $this->safeJsonEncode($data, false);
38-
$jsonEvent = str_replace(['null', 'true', 'false'], ['None', 'True', 'False'], $jsonEvent);
3938
$jsonPlatform = json_encode($platform, JSON_UNESCAPED_SLASHES);
40-
$jsonPlatform = str_replace(['null', 'true', 'false'], ['None', 'True', 'False'], $jsonPlatform);
39+
40+
$jsonPlatform = str_replace(
41+
[
42+
":null,", ":null",
43+
":false,", ":false",
44+
":true,", ":true"
45+
], [
46+
":None,", ":None",
47+
":False,", ":False",
48+
":True,", ":True"
49+
],
50+
$jsonPlatform
51+
);
52+
53+
$jsonEvent = str_replace(
54+
[
55+
":null,", ":null",
56+
":false,", ":false",
57+
":true,", ":true"
58+
], [
59+
":None,", ":None",
60+
":False,", ":False",
61+
":True,", ":True"
62+
],
63+
$jsonEvent
64+
);
65+
4166
$protocol = config('df.scripting.default_protocol', 'http');
4267
$https = array_get($_SERVER, 'HTTPS');
4368
if ((!empty($https) && ('off' != $https)) || (443 == array_get($_SERVER, 'SERVER_PORT'))) {

0 commit comments

Comments
 (0)