Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Update Admin toString method #1232

Closed
wants to merge 1 commit into from

2 participants

@EmmanuelVella

As the getSubject method may return a boolean, the toString method can throw an exception.

@EmmanuelVella EmmanuelVella Update Admin toString method
As the getSubject method may return a boolean, the toString method can throw an exception.
26785e1
@rande
Owner

cherry picked and merged on 2.1 and master

@rande rande closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 19, 2013
  1. @EmmanuelVella

    Update Admin toString method

    EmmanuelVella authored
    As the getSubject method may return a boolean, the toString method can throw an exception.
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 0 deletions.
  1. +4 −0 Admin/Admin.php
View
4 Admin/Admin.php
@@ -2531,6 +2531,10 @@ public function getRouteBuilder()
*/
public function toString($object)
{
+ if (!is_object($object)) {
+ return '';
+ }
+
if (method_exists($object, '__toString')) {
return (string) $object;
}
Something went wrong with that request. Please try again.