orchestral / platform

Orchestra Platform Application Skeleton
http://orchestraplatform.com/docs/latest
315 stars 33 forks source link

[Insight] Logical operators should be avoided #31

Closed crynobone closed 10 years ago

crynobone commented 10 years ago

in server.php, line 14

The and operator does not have the same precedence as &&. This could lead to unexpected behavior, use && instead.

$requested = $paths['public'].$uri;

// This file allows us to emulate Apache's "mod_rewrite" functionality from the
// built-in PHP web server. This provides a convenient way to test a Laravel
// application without having installed a "real" web server software here.
if ($uri !== '/' and file_exists($requested))
{
    return false;
}

require_once $paths['public'].'/index.php';

Posted from SensioLabsInsight

GrahamCampbell commented 10 years ago

This issue is in laravel/laravel too. I've seen it on my SensioLabsInsight travels.

crynobone commented 10 years ago

Have no interest to make a PR for laravel :P