Closed (won't fix)
Project:
Coder
Version:
7.x-2.0-beta1
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Jan 2013 at 14:57 UTC
Updated:
10 Oct 2016 at 11:46 UTC
Jump to comment: Most recent
When installing a profile with drush that contains coder I get this notices in my console.
Invalid argument supplied for foreach() bootstrap.inc:1511 [warning]
strtr(): The second argument is not an array bootstrap.inc:1528 [warning]
Invalid argument supplied for foreach() bootstrap.inc:1511 [warning]
strtr(): The second argument is not an array bootstrap.inc:1528 [warning]
Invalid argument supplied for foreach() bootstrap.inc:1511 [warning]
strtr(): The second argument is not an array bootstrap.inc:1528 [warning]
Invalid argument supplied for foreach() bootstrap.inc:1511 [warning]
strtr(): The second argument is not an array bootstrap.inc:1528
Seems like dt() and format_string do not rock toghter.
format_string is expecting the secound argument to be an array, but in these cases it isnt.
I printed the strings when !is_array($arg) and the result was:
Comma delimited list of file extensions to scan. The default is php,module,inc,install,test,profile,theme [status]
Specify the name of the set of file extensions to scan if no extensions are specified. Options are: default, extended. [status]
Specify the report format. Options are: full, xml, checkstyle, csv, emacs, source, summary, svnblame, gitblame or hgblame. [status]
Write the report to the specified file path.
Comments
Comment #1
anonComment #2
Letharion commentedThe format of the
$items['drupalcs']['options']appears incorrect. Comparing with other extensions I have locally, the 'example-value' key shouldn't be there, and is the cause of the problem. Looks pretty delibarate though, so perhaps newer drush (than 4) supports this syntax, while older versions choke on it?Setting to minor as the error message is just ugly, not really of any consequence.
Comment #3
klausiCoder 7.x is frozen now and will not receive updates. Coder 8.x-2.x can be used to check code for any Drupal version, Coder 8.x-2.x also supports the phpcbf command to automatically fix conding standard errors. Please check if this issue is still relevant and reopen against that version if necessary.