Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Commit

Permalink
CS/QA: replace a loose comparison
Browse files Browse the repository at this point in the history
Reasoning:
* Initially the property is `null` (not set).
* The property may get initialized by it being passed in via `$args`. In that case, it is expected to be a `string`, but there is no type check anywhere, so it could be something else.

Having said that, changing this to a strict comparison could still create a passing condition, unless we also add an `is_string()` as well.
  • Loading branch information
jrfnl committed Feb 10, 2018
1 parent b70226e commit 869f77b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/i18n-module.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public function promo() {

echo '<div>';
echo '<h2>' . sprintf( __( 'Translation of %s', $this->textdomain ), $this->plugin_name ) . '</h2>';
if ( isset( $this->glotpress_logo ) && '' != $this->glotpress_logo ) {
if ( isset( $this->glotpress_logo ) && is_string( $this->glotpress_logo ) && '' !== $this->glotpress_logo ) {
echo '<a href="' . esc_url( $this->register_url ) . '"><img class="alignright" style="margin:0 5px 5px 5px;max-width:200px;" src="' . esc_url( $this->glotpress_logo ) . '" alt="' . esc_attr( $this->glotpress_name ) . '"/></a>';
}
echo $message;
Expand Down

0 comments on commit 869f77b

Please sign in to comment.