Missing Comparison Operator in IF statement

file: date_ical.module
line 103

if ($image = theme('image', $variables)) {
  return "<a href='{$variables['url']}' class='ical-icon'>$image</a>";
}
else {
  return "<a href='{$variables['url']}' class='ical-icon'>{$variables['tooltip']}</a>";
}
CommentFileSizeAuthor
#1 date_ical-2340595-1.patch933 bytesmqanneh
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mqanneh’s picture

FileSize
933 bytes
coredumperror’s picture

Status: Needs work » Closed (works as designed)

That single equal-sign is actually intentional. It's both assigning the return value of theme('image', $variables) into $image and checking if $image is truthy at the same time.