Skip to content

Commit

Permalink
Fix fatal error in casting objects without __toString() method
Browse files Browse the repository at this point in the history
  • Loading branch information
nextime committed Aug 4, 2015
1 parent 7b328bf commit 43a3ea9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/WordPressHTTPS.php
Expand Up @@ -360,6 +360,9 @@ public function isUrlLocal($url) {
* @return string $string
*/
public function makeUrlHttps( $string ) {
if(is_object($string) && !method_exists($string, "__toString")) {
return false;

if ( (string)$string == '' ) {
return false;
}
Expand Down

0 comments on commit 43a3ea9

Please sign in to comment.