The watchdog message in aggregator.fetch.inc refers to $feed->title, a value that is not guaranteed to be known
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #1337898. -->
Reported by: [jessebeach](https://www.drupal.org/user/748566)
>>>
<p>The current watchdog message in aggregator.fetch.inc, aggregator_aggregator_fetch(), informs the user of an error by referring to the feed's title.</p>
<p><code>watchdog('aggregator', 'The feed from %site seems to be broken, due to "%error".', array('%site' => $feed->title, '%error' => $result->code . ' ' . $result->error), WATCHDOG_WARNING);</code></p>
<p>I've found that $feed->title can be null, leading to a PHP error. In addition, $feed->title is not as useful as $feed->url. Given $feed->title, a user needs to dig into configuration to find the feed's url in order to investigate why the feed is returning an error.</p>
<p>I propose the following change:</p>
<p><code>watchdog('aggregator', 'The feed from %url seems to be broken, due to "%error".', array('%url' => $feed->url, '%error' => $result->code . ' ' . $result->error), WATCHDOG_WARNING);</code></p>
<p>$feed->url is likely to exist and given the URL in the error message, a developer can more rapidly track down the issue causing the feed access to fail.</p>
issue