mirror of
https://github.com/google/blockly.git
synced 2026-01-04 15:40:08 +01:00
Fix code generation for procedures (PHP, Python).
This commit is contained in:
@@ -34,7 +34,8 @@ Blockly.PHP['procedures_defreturn'] = function(block) {
|
||||
// a local parameter.
|
||||
var globals = [];
|
||||
var varName;
|
||||
var variables = workspace.getAllVariables();
|
||||
var workspace = block.workspace;
|
||||
var variables = workspace.getAllVariables() || [];
|
||||
for (var i = 0, variable; variable = variables[i]; i++) {
|
||||
varName = variable.name;
|
||||
if (block.arguments_.indexOf(varName) == -1) {
|
||||
|
||||
Reference in New Issue
Block a user