Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I keep having this warning message appear.
Warning: in_array() expects parameter 2 to be array, null given in lessc_parser->openString() (line 2575 of /Users/myuser/Sites/mytheme/public_html/sites/all/libraries/lessphp/lessc.inc.php).
I was using an older version of LESS and thought that upgrading would solve it but the problem persists.
Has anyone ran across this in the past? When I go to that file I don't notice anything unusual going on.
This is the array at line 2575.
if (in_array($tok, $rejectStrs)) {
$count = null;
break;
}
Comments
Comment #1
corey.aufang CreditAttribution: corey.aufang commentedCan you tell me the version of lessphp that you are using and the LESS code that the error is be generated with?
Comment #2
corey.aufang CreditAttribution: corey.aufang commentedI was unable to reproduce your error.
I'm guessing that the issue was due to either a LESS syntax error that the library did not handle well, or that you were using a feature that is not supported by the version of the leafo/lessphp library.
I using the new oyejorge/less.php library, http://lessphp.gpeasy.com/#integration-with-other-projects
If you are still having an issue, please reopen this ticket.