Переглянути джерело

Avoid "PHP Strict Standards" error

A "Only variables should be passed by reference" error was raised in the
extension->getFileUrl() method.
Marien Fressinaud 11 роки тому
батько
коміт
2039710d12
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      lib/Minz/Extension.php

+ 1 - 1
lib/Minz/Extension.php

@@ -159,7 +159,7 @@ class Minz_Extension {
 	 * @return the url corresponding to the file.
 	 */
 	public function getFileUrl($filename, $type) {
-		$dir = end(explode('/', $this->path));
+		$dir = substr(strrchr($this->path, '/'), 1);
 		$file_name_url = urlencode($dir . '/static/' . $filename);
 
 		$absolute_path = $this->path . '/static/' . $filename;