[Plugin: Developer Formatter] Version 2009.0.1.33 errors
-
When I updated to version 2009.0.1.33, I was getting a bunch of errors about things not being arrays. I fixed them with explicit casts to array. It also might make sense in some cases to gate earlier in the logic in such a way that these lines would only get called when the contents are an array (rather than using the explicit cast). I’m not familiar enough with the logic of this section to say.
The unix diff of the changes that worked for me:
diff -bBr devformatter/devgeshi.php plugins/devformatter/devgeshi.php 100c100 < $langData = implode("\n", @file("http://svn.wp-plugins.org/devformatter/branches/langs/".$ALanguage.".php")); --- > $langData = implode("\n", (array)@file("http://svn.wp-plugins.org/devformatter/branches/langs/".$ALanguage.".php")); diff -bBr devformatter/geshi/geshi.php plugins/devformatter/geshi/geshi.php 1925c1925 < foreach (array_keys($this->language_data['KEYWORDS']) as $key) { --- > foreach (array_keys((array)$this->language_data['KEYWORDS']) as $key) { 2290c2290 < foreach ($this->language_data['QUOTEMARKS'] as $quotemark) { --- > foreach ((array)$this->language_data['QUOTEMARKS'] as $quotemark) { 3241,3242c3241,3242 < if ($this->lexic_permissions['STRINGS']) { < $quotemarks = preg_quote(implode($this->language_data['QUOTEMARKS']), '/'); --- > if (isset($this->lexic_permissions['STRINGS']) && $this->lexic_permissions['STRINGS']) { > $quotemarks = preg_quote(implode('/', (array)$this->language_data['QUOTEMARKS'])); 3252c3252 < $x = 0; // check wether per-keyword-group parser_control is enabled --- > $x = 0; // check whether per-keyword-group parser_control is enabled 3265c3265 < foreach (array_keys($this->language_data['KEYWORDS']) as $k) { --- > foreach (array_keys((array)$this->language_data['KEYWORDS']) as $k) { 3306c3306 < foreach ($this->language_data['REGEXPS'] as $key => $regexp) { --- > foreach ((array)$this->language_data['REGEXPS'] as $key => $regexp) { 3357c3357 < foreach (array_keys($this->language_data['KEYWORDS']) as $k) { --- > foreach (array_keys((array)$this->language_data['KEYWORDS']) as $k) { 3502c3502 < foreach (array_keys($this->language_data['REGEXPS']) as $key) { --- > foreach (array_keys((array)$this->language_data['REGEXPS']) as $key) { 3643c3643 < foreach (array_keys($this->language_data['KEYWORDS']) as $key) { --- > foreach (array_keys((array)$this->language_data['KEYWORDS']) as $key) { 3651c3651 < foreach (array_keys($this->language_data['COMMENT_SINGLE']) as $key) { --- > foreach (array_keys((array)$this->language_data['COMMENT_SINGLE']) as $key) { 3654c3654 < foreach (array_keys($this->language_data['REGEXPS']) as $key) { --- > foreach (array_keys((array)$this->language_data['REGEXPS']) as $key) {
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘[Plugin: Developer Formatter] Version 2009.0.1.33 errors’ is closed to new replies.