Skip to content

Commit

Permalink
fixed funny initialisation of static local variable
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Sep 14, 2010
1 parent 41a50aa commit 524ad88
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/ddl/sql_generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -918,9 +918,7 @@ public function getNameForObject($tablename, $fields, $suffix='') {
/// We need this because sql statements are created before executing
/// them, hence names doesn't exist "physically" yet in DB, so we need
/// to known which ones have been used
if (!isset($used_names)) {
static $used_names = array();
}
static $used_names = array();

/// Use standard naming. See http://docs.moodle.org/en/XMLDB_key_and_index_naming
$tablearr = explode ('_', $tablename);
Expand Down

0 comments on commit 524ad88

Please sign in to comment.