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' =&gt; $feed-&gt;title, '%error' =&gt; $result-&gt;code . ' ' . $result-&gt;error), WATCHDOG_WARNING);</code></p> <p>I've found that $feed-&gt;title can be null, leading to a PHP error. In addition, $feed-&gt;title is not as useful as $feed-&gt;url. Given $feed-&gt;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' =&gt; $feed-&gt;url, '%error' =&gt; $result-&gt;code . ' ' . $result-&gt;error), WATCHDOG_WARNING);</code></p> <p>$feed-&gt;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