Thread:Extension talk:WYSIWYG/Dialog "Tag" (=special.js) crashes, array variable wgCKeditorMagicWords undefined/reply

I have banged my head against the wall with this for many days now.... so here is the long story :)

By trial and error I was able to figure out how I could pass php variable value into use of javascript code: value of php variable should be used to create javascript variable definition in javascript code part of CKeditor.body.php.

Then my next problem was how to get the array value of $vars from function onMakeGlobalVariablesScript into use, this variable contains the missing data dialog special.js needs. Based on my tests it was impossible, if I did similar kind of definition as is in onMakeGlobalVariablesScript directly into my own variable, I could get the value and pass it to javascript. But using function $this->onMakeGlobalVariablesScript($vars) it did not work.

Then I changed parameter definition of function onMakeGlobalVariablesScript( $vars ) to ( &$vars ) and that seemed to do the trick. In fact that was the only modification needed to get the special.js dialog to work properly.

Modified definition of function onMakeGlobalVariablesScript in CKeditor.body.php:

Can the solution really be this simple: add & before variable $vars ? ...or does this make it fail in some other function of MW ?