mirror of
https://github.com/google/blockly.git
synced 2026-01-05 08:00:09 +01:00
Fix python and php procedures.
This commit is contained in:
@@ -33,8 +33,10 @@ Blockly.PHP['procedures_defreturn'] = function(block) {
|
||||
// First, add a 'global' statement for every variable that is not shadowed by
|
||||
// a local parameter.
|
||||
var globals = [];
|
||||
var varName;
|
||||
var variables = workspace.getAllVariables();
|
||||
for (var i = 0, varName; varName = variables[i].name; i++) {
|
||||
for (var i = 0, variable; variable = variables[i]; i++) {
|
||||
varName = variable.name;
|
||||
if (block.arguments_.indexOf(varName) == -1) {
|
||||
globals.push(Blockly.PHP.variableDB_.getName(varName,
|
||||
Blockly.Variables.NAME_TYPE));
|
||||
|
||||
Reference in New Issue
Block a user