peteboere / css-crush

CSS preprocessor.
http://the-echoplex.net/csscrush
MIT License
537 stars 51 forks source link

Undefined array keys php8 #100

Closed gtbu closed 11 months ago

gtbu commented 1 year ago

With php 8.1 i get WARNING: Undefined array key "selector" /mnt/web418/......./htdocs/ul2022/assets/crush/lib/CssCrush/Process.php:633 WARNING: Undefined array key "block_content" /mnt/web418/......./htdocs/ul2022/assets/crush/lib/CssCrush/Process.php:634 WARNING: Undefined array key "trace_token" /mnt/web418/......../htdocs/ul2022/assets/crush/lib/CssCrush/Process.php:654 WARNING: Undefined array key 0 /mnt/web418/......../htdocs/ul2022/assets/crush/lib/CssCrush/Process.php:659

Possible Solution : 633 $selector = trim($ruleMatch['selector'] ?? null); 634 $block = trim($ruleMatch['block_content'] ?? null); etc. ................................................................................... P.S. The syntax-documentation is not obvious - also a path-problem $file1 = DIR . '/crush.css'; echo csscrush_tag($file1); echo csscrush_tag('crush.css); doesnt function --- same with csscrush_set( ) - always needs a variable

peteboere commented 1 year ago

Thanks for the report, but I can't reproduce. Please include steps (input, behaviour and expected behaviour)