Skip to content

Commit 2b26556

Browse files
committed
Broadened the setting logic for user and sketch id
Before these two variables would be set only if both of them were passed in the request, now they are independently set.
1 parent 7aacdc2 commit 2b26556

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Symfony/src/Codebender/CompilerBundle/Handler/CompilerHandler.php

+7-3
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ function main($request, $compiler_config)
117117

118118
// Log the names of the project files and the libraries used in it.
119119
if ($format != "autocomplete") {
120-
$user_id = $sketch_id = "null";
121120
$req_elements = array("Files: ");
122121

123122
foreach ($request["files"] as $file) {
@@ -136,9 +135,14 @@ function main($request, $compiler_config)
136135
$req_elements[] = $libname . "/" . $libfile["filename"];
137136
}
138137
}
139-
140-
if (isset($request['userId']) && isset($request['projectId'])) {
138+
139+
$user_id = "null";
140+
if (isset($request['userId'])) {
141141
$user_id = $request['userId'];
142+
}
143+
144+
$sketch_id = "null";
145+
if (isset($request['projectId'])) {
142146
$sketch_id = $request['projectId'];
143147
}
144148

0 commit comments

Comments
 (0)