CWE-683ΒΆ
Function Call With Incorrect Order of Arguments. [Improper-Adherence-To-Coding-Standards]
Required inputs: IR
Demonstrative Examples
Example 1
The following PHP method authenticates a user given a username/password combination but is called with the parameters in reverse order.
Example Language:PHP (Unsupported language for documentation only)
function authenticate($username, $password) {
// authenticate user
...
}
authenticate($_POST['password'], $_POST['username']);Excerpts from CWE [https://cwe.mitre.org], Copyright (C) 2006-2026, the MITRE Corporation. See section 9.4. "3rd-Party Licenses" in the documentation for full details.Possible Messages
Key |
Text |
Severity |
Disabled |
|---|---|---|---|
possible_argument_order_mixed_up |
Name of call argument {} at position {} equals name of parameter at position {}. |
None |
False |
Options
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
This rule has no individual options.