瀏覽代碼

simplified ternary-operator

Martin Schuhfuss 14 年之前
父節點
當前提交
04302ffe98
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Bundle/FrameworkBundle/HttpKernel.php

+ 1 - 1
src/Symfony/Bundle/FrameworkBundle/HttpKernel.php

@@ -177,7 +177,7 @@ class HttpKernel extends BaseHttpKernel
         $path = http_build_query($attributes);
         $uri = $this->container->get('router')->generate('_internal', array(
             'controller' => $controller,
-            'path'       => $path ? $path : 'none',
+            'path'       => $path ?: 'none',
             '_format'    => $this->container->get('request')->getRequestFormat(),
         ));