PluXml icon indicating copy to clipboard operation
PluXml copied to clipboard

Missing delimiters in preg_grep in plxAdmin editCategories()

Open sudwebdesign opened this issue 5 years ago • 2 comments

https://github.com/pluxml/PluXml/blob/436ad00e681d089131ee58e326c1a9094a6b60b1/core/lib/class.plx.admin.php#L659

missing modified [0-9]{3} TO #\d{3}# Will be good with this replacement :

	if(count(preg_grep('#\d{3}#', $filenameArrayCat)) > 1) {

sudwebdesign avatar Jun 06 '20 03:06 sudwebdesign

You are missing some tricks :

grep -n '\[0-9\]' *.php update/*.php core/{admin,lib}/*.php
echo "$(grep -n '\[0-9\]' *.php update/*.php core/{admin,lib}/*.php | wc -l) lines"

Just 34 lines for checking. You can use "sed" for a batch of replacements

bazooka07 avatar Jun 06 '20 09:06 bazooka07

Marvelous tricks :+1: Found this Notice with debug = true in config ;)

sudwebdesign avatar Jun 06 '20 20:06 sudwebdesign