0

I'm getting this error. I have tried every sort of solution, would appreciate if someone could help me out.

Notice: Only variables should be passed by reference in C:\Users\Data\Desktop\Store\init.php on line 53

Notice: Only variables should be passed by reference in C:\Users\Data\Desktop\Store\init.php on line 65


Line 53:      $class_name = $bits[end((array_keys($bits)))];
Line 65:       $bits[end((array_keys($bits)))] .= ".php";

check image for more info.

Line 53 and Line 65:

enter image description here

sr9yar
  • 4,850
  • 5
  • 53
  • 59
Dan
  • 1
  • 4
    Please provide an [MCVE of your code](https://stackoverflow.com/help/mcve). Posting an image makes it harder for us to help you. Also explain **what** you've tried, instead of saying "I've tried every sort of solution." That doesn't tell us what you've tried, only that you've tried what you've been able to google. Give us specifics. – Tiffany Jul 18 '18 at 13:18
  • Done. Edited. The thing is I don't know what "Only variables should be passed by reference means?" means. I tried using google, but I still can't find anything that could help me out in any way. Please let me know if you know how to fix the problem above, and let me know if you need me to post more of the code. Sorry in advance, I'm new to programming. :) – Dan Jul 18 '18 at 18:20
  • I have a strong suspicion `$count = @count($bits);` is causing trouble for you, because you have it set to ignore errors by using `@`. You should fix the error that's encountered from `count()` because there's a strong chance it's hiding the real problem, and in effect, is causing ambiguity in your code and the notices you're receiving. – Tiffany Jul 18 '18 at 18:50
  • Still nothing. I'm getting the same error. I have put the whole code on pastebin so you can check it. [link](https://pastebin.com/VYfVAt87) – Dan Jul 18 '18 at 21:27

0 Answers0