Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Error: end - Only variables should be passed by reference #2

Closed
kmindi opened this issue Feb 14, 2013 · 0 comments
Closed

PHP Error: end - Only variables should be passed by reference #2

kmindi opened this issue Feb 14, 2013 · 0 comments

Comments

@kmindi
Copy link
Contributor

kmindi commented Feb 14, 2013

As the error message suggests one correction would be:

@@ -13,7 +13,8 @@ class LClientScript extends CClientScript{
     public function registerCssFile($url, $media='')
     {
         //if the file extension is .less, use the lessparser.
-        $file_extension = end(explode('.',$url));
+        $splittedarray = explode('.',$url);
+        $file_extension = end($splittedarray);
         if($file_extension == 'less'){
             $url = $this->compileLess($url, false);
         }

But as suggested(
http://stackoverflow.com/questions/4636166/only-variables-should-be-passed-by-reference):

$file_extension = pathinfo($file_name, PATHINFO_EXTENSION);
Andrekra pushed a commit that referenced this issue Feb 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants