Preg_match error in K2 images

GK User
Sat May 09, 2015 3:50 am
I keep getting the following error message when adding an image to the K2 component:

Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in /home/sharond1/public_html/administrator/components/com_k2/lib/class.upload.php on line 2950

Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in /home/sharond1/public_html/administrator/components/com_k2/lib/class.upload.php on line 3004

Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in /home/sharond1/public_html/administrator/components/com_k2/lib/class.upload.php on line 3022

I've tried various options of resizing (down to less than 2MB) and changing files names. Could someone send through a fix for the code on these lines, please:

2950: if (preg_match("/^([\.-\w]+)\/([\.-\w]+)(.*)$/i", $this->file_src_mime)) {
3004: if (preg_match("/^([\.-\w]+)\/([\.-\w]+)(.*)$/i", $this->file_src_mime)) {
3022: if (preg_match("/^([\.-\w]+)\/([\.-\w]+)(.*)$/i", $this->file_src_mime)) {

Thanks
Shaz
User avatar
Fresh Boarder

GK User
Sat May 09, 2015 3:51 am
should add that it is a new problem - was working fine before
User avatar
Fresh Boarder

teitbite
Sun May 17, 2015 11:35 am
Hi

I haven't see such issue reported before. Please try asking in K2 forum about it. I'm afraid this is not related with template so I cannot help here.
User avatar
Moderator


cron