Advertisement:

Author Topic: warnings from 2.3.5  (Read 11472 times)

pahure

  • Newbie
  • *
  • Posts: 6
warnings from 2.3.5
« on: January 17, 2012, 03:42:42 am »
Message from my updated installation when I do a search like :

/index.php?page=search&sPattern=&sCity=&sPriceMin=&sPriceMax=&sCategory[]=2

Code: [Select]
Warning: preg_match() expects parameter 2 to be string, array given in /--/osclass.2.3.5/oc-includes/htmlpurifier/HTMLPurifier/Lexer.php on line 316
Warning: preg_match() expects parameter 2 to be string, array given in /--/osclass.2.3.5/oc-includes/htmlpurifier/HTMLPurifier/Encoder.php on line 54
Warning: strlen() expects parameter 1 to be string, array given in /--/osclass.2.3.5/oc-includes/htmlpurifier/HTMLPurifier/Encoder.php on line 72

Is it lethal, doc ;-) ?

pahure

  • Newbie
  • *
  • Posts: 6
Re: warnings from 2.3.5
« Reply #1 on: January 17, 2012, 04:01:08 am »
Another warning When I try to publish a new item with Custom Fields
index.php?page=item&action=item_add&catId=1

Code: [Select]
Warning: Invalid argument supplied for foreach() in /--/osclass.2.3.5/oc-includes/osclass/frm/Field.form.class.php on line 95
And no fields are displaying. I have to stay at 2.3.4 :-(

ingo

  • Full Member
  • ***
  • Posts: 216
Re: warnings from 2.3.5
« Reply #2 on: January 17, 2012, 10:16:42 am »
Hi,

I have the same Warning

Warning: Invalid argument supplied for foreach() in /--/osclass.2.3.5/oc-includes/osclass/frm/Field.form.class.php on line 95

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: warnings from 2.3.5
« Reply #3 on: January 17, 2012, 01:25:31 pm »
A mistake of a last minute change. You can download again from here and it will work again the custom fields: https://sourceforge.net/projects/osclass/files/2.3/

The HTMLPurifier warnings I don't know why they're appearing in some pages... we're going to figure out. However, it doesn't affect the functionalities.

chanjay

  • Newbie
  • *
  • Posts: 6
Re: warnings from 2.3.5
« Reply #4 on: January 17, 2012, 10:17:36 pm »
A mistake of a last minute change. You can download again from here and it will work again the custom fields: https://sourceforge.net/projects/osclass/files/2.3/

The HTMLPurifier warnings I don't know why they're appearing in some pages... we're going to figure out. However, it doesn't affect the functionalities.

Hi Ramon and everyone,

I got the same warnings on 2.3.5, so what should I do? re-install 2.3.5? If so, how do I do it from admin panel?

Thanks.

hc.

chanjay

  • Newbie
  • *
  • Posts: 6
Re: warnings from 2.3.5
« Reply #5 on: January 17, 2012, 11:34:35 pm »
I re-downloaded the 2.3.5 from the link and followed the manual upgrade steps from http://wiki.osclass.org/Updating_OSClass

This error still there.

Warning: Invalid argument supplied for foreach() in /--/osclass.2.3.5/oc-includes/osclass/frm/Field.form.class.php on line 95

Please help!

Thanks.

hc.

sardinha

  • Newbie
  • *
  • Posts: 5
Re: warnings from 2.3.5
« Reply #6 on: January 18, 2012, 02:57:53 am »
chanjay,

I had the same problem. You can check if you have really the last version 3.5 comparing your Field.php file with the changed lines in the file oc-includes/osclass/model/Field.php as described in last github commit: https://github.com/osclass/OSClass/commit/1e3bf2f8a1a0a3cd15c580557ca042a7dc1b303c

 By now, I have only the warnings when refine search with categories...

chanjay

  • Newbie
  • *
  • Posts: 6
Re: warnings from 2.3.5
« Reply #7 on: January 18, 2012, 03:36:36 am »
Hi Sardinha,

When I compared them, mine was missing this:

Code: [Select]
if( !is_numeric($catId) || (!is_numeric($itemId) && $itemId != null) ) {
              return array() ;

However, after I added the code above, the site does not work. Blank page with this error code:
Parse error: syntax error, unexpected T_PUBLIC in /.../oc-includes/osclass/model/Field.php on line 149

Any idea?

hc.

chanjay

  • Newbie
  • *
  • Posts: 6
Re: warnings from 2.3.5
« Reply #8 on: January 18, 2012, 03:48:40 am »
Please ignore my post above, it works now! ;)

I misunderstood....the line supposed to be replaced, instead of added.

Thanks.

hc.

cool

  • Newbie
  • *
  • Posts: 19
Re: warnings from 2.3.5
« Reply #9 on: January 18, 2012, 01:00:48 pm »
warning in feed also

chanjay

  • Newbie
  • *
  • Posts: 6
Re: warnings from 2.3.5
« Reply #10 on: January 18, 2012, 11:08:30 pm »
I did further testing to my site and found out that after posting an ad, it gave me few more warnings. >:( I guess I am going to do freshly re-installation, since my site has not been published yet and not a lot of modification been made. Please let me know which link is the most updated 2.3.5.

Thanks.

hc.

Raman

  • Newbie
  • *
  • Posts: 7
Re: warnings from 2.3.5
« Reply #11 on: January 22, 2012, 11:50:32 am »
Hi Juan Ramon, HTMLPurifier warnings ... oc-includes/htmlpurifier/HTMLPurifier/Lexer.php on line 316, ... oc-includes/htmlpurifier/HTMLPurifier/Encoder.php on line 54 appear when refining search  on OSClass 2.3.5. I have downloaded the latest version. Hope this information helps.

Alexandr

  • Full Member
  • ***
  • Posts: 126
Re: warnings from 2.3.5
« Reply #12 on: January 23, 2012, 04:53:22 pm »
I'm afraid to update  :'(
« Last Edit: January 23, 2012, 04:57:18 pm by Alexandr »

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: warnings from 2.3.5
« Reply #13 on: January 24, 2012, 09:59:49 pm »
Can you replace your Params.php file for the following one: https://github.com/osclass/OSClass/blob/hotfixes/oc-includes/osclass/core/Params.php

Do you still have this error?

tharangaou

  • Newbie
  • *
  • Posts: 2
Re: warnings from 2.3.5
« Reply #14 on: January 25, 2012, 09:39:59 am »
No error displayed now, thanks