Automattic / babble

Multilingual WordPress done right.
https://wordpress.org/plugins/babble/
245 stars 50 forks source link

Remove error suppression `@` #223

Closed simonwheatley closed 9 years ago

simonwheatley commented 9 years ago

We should not be using @ anywhere. We should remove it and have better checks on variables existing, where necessary.

simonwheatley commented 9 years ago

For example:

$lang->url_prefix = ( @ isset( $_POST[ 'url_prefix_' . $code ] ) ) ? $_POST[ "url_prefix_$code" ] : @ $lang->url_prefix;

Note this also could be expanded into a more standard conditional, rather than a ternary operators, so it's clearer.