-2

Hi kindly help me check if there's any problem with my code. I am creating a command to generate a sitemap but am getting an error; 'unexpected ')' on line 65.

here is the screenshot for the code

1 Answers1

1

I think the issue is on the IF statement. Just remove the last OR operator from the condition. Like this:

 if (
        $url->segment(1) == $priority[0] ||
        $url->segment(1) == $priority[1] ||
        $url->segment(1) == $priority[2]
    ) {...}

If this is not the issue, maybe you can tell us what is the line 65.

  • Thanks so much. This is the solution. Am so grateful – Isaac Ongoma Dec 11 '20 at 22:37
  • Questions that are the result of typographic errors or are otherwise unreproducible are not on-topic. Instead of answering them, leave a comment for the user if you have the reputation to do so, and flag the question for closure. – miken32 Dec 11 '20 at 22:47