Skip to content

Instantly share code, notes, and snippets.

/gist:4996553
Created Feb 20, 2013

Embed
What would you like to do?
<?php if (function_exists('contact_detail')) {
$chair = contact_detail('chair'),
$address = contact_detail('address')
}
?>
@tomjn

This comment has been minimized.

Copy link

commented Feb 20, 2013

line 2 has a comma at the end not a semicolon, line 3 lacks a semi-colon, the statement is thus incomplete, and will cause a fatal syntax error when it reaches the closing brace on line 4.

Also line 1 has both the opening tags and the if statement, line 4 is mis-indented, and line 5s closing php tag isn't aligned with the opening tag.

WP Coding standards would say you're also missing blank space between your function args and your parameters, and inside your if statement

@NickToye

This comment has been minimized.

Copy link

commented Feb 20, 2013

What is wrong with line 1?

@NickToye

This comment has been minimized.

Copy link

commented Feb 20, 2013

I can fix the indentations. :)

@NickToye

This comment has been minimized.

Copy link

commented Feb 20, 2013

Its actually indented correctly on my machine, it just copied across weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.