Yoast/wordpress-seo — pull request #501 by jrfnl (2013-12-27 01:55:54+00:00)
Title: Fix for issue #306 / rtrim() expects parameter 1 to be string, object given

The `WPSEO_Frontend->canonical()` method checks for a wp error object, but for some unfathomable reason, sometimes this check fails and a wp error object is still passed to the calling function.

This pull request makes sure that in all places where `WPSEO_Frontend->canonical()` is used, the returned value is checked to be a string before using it.