Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove the debug option.

If want to hide runtime error, should update bootstrap.php.cache's error reporting setting instead. In Kernel->init() , change `error_reporting(-1)` to `error_reporting(E_ALL ^ E_NOTICE)`.
  • Loading branch information...
commit ff6a72982960c030b8be01a7ebadab626217f7a5 1 parent c39f957
@kayue authored
View
1  DependencyInjection/Configuration.php
@@ -20,7 +20,6 @@ public function getConfigTreeBuilder()
->children()
->scalarNode('wordpress_path')->isRequired()->cannotBeEmpty()->end()
->booleanNode('short_init')->defaultValue(false)->end()
- ->booleanNode('debug')->defaultValue(false)->end()
->end()
;
View
17 Extensions/WordpressTwigExtension.php
@@ -10,13 +10,6 @@
*/
class WordpressTwigExtension extends \Twig_Extension
{
- protected $debug = false;
-
- public function __construct($debug)
- {
- $this->debug = $debug;
- }
-
public function getName()
{
return 'wordpress';
@@ -32,13 +25,9 @@ public function getGlobals()
public function __call($function, $arguments) {
$function = $this->camelcaseToUnderscore($function);
- // Since a lot of Wordpress plugins are poorly written, the WordpressBundle
- // will try to not display any error message.
- if($this->debug) {
- return call_user_func_array($function, $arguments);
- }
-
- return @call_user_func_array($function, $arguments);
+ // Since a lot of Wordpress plugins are poorly written, we recommend you
+ // turn of PHP's runtime notice when debugging.
+ return call_user_func_array($function, $arguments);
}
/**
View
1  Resources/config/services.xml
@@ -59,7 +59,6 @@
<service id="wordpress.twig.extension"
class="Hypebeast\WordpressBundle\Extensions\WordpressTwigExtension"
public="true">
- <argument>%hypebeast_wordpress.debug%</argument>
<tag name="twig.extension" />
</service>
Please sign in to comment.
Something went wrong with that request. Please try again.