@@ -275,7 +275,8 @@ class pQuery {
}
/**
- * Assert that the given constants have been defined. Add the prefix 'PQUERY_' to each constant name.
+ * Assert that the given constants have been defined.
+ * Add the prefix 'PQUERY_' to each constant name.
*/
static function assert_defined(/* $constant1 [ , $constant2, ... ] */) {
$constants = func_get_args();
@@ -61,8 +61,8 @@ class pQueryTemplate extends pQuery implements pQueryExtension {
$found = false;
$filename = $this->variable;
- // Add default extension
- strpos($filename, '.') || $filename .= '.'.self::DEFAULT_EXTENSION;
+ // Add default extension if none is found
+ strpos($filename, '.') === false && $filename .= '.'.self::DEFAULT_EXTENSION;
foreach( self::$include_path as $root ) {
$path = $root.$filename;