Browse Source

Fix fos_rest bundle issues after upgrade to v2

Julio 6 years ago
parent
commit
8affc492cb

+ 8 - 0
app/config/config.yml

@@ -289,3 +289,11 @@ knp_menu:
 sonata_doctrine_orm_admin:
     audit:
         force: false # Audits are set in the admin.yml files with audit:true
+
+sensio_framework_extra:
+    view:
+        annotations: true
+
+fos_rest:
+    access_denied_listener: true
+    exception: true # Activates the FOSRestBundle exception controller

+ 1 - 1
src/Chamilo/FaqBundle/Entity/Category.php

@@ -75,7 +75,7 @@ class Category
      */
     public function __toString()
     {
-        return $this->getHeadline();
+        return (string) $this->getHeadline();
     }
 
     /**

+ 1 - 1
src/Chamilo/FaqBundle/Entity/Question.php

@@ -80,7 +80,7 @@ class Question
      */
     public function __toString()
     {
-        return $this->getHeadline();
+        return (string) $this->getHeadline();
     }
 
     /**