-
AuthorPosts
-
dieudonne Friend
dieudonne
- Join date:
- January 2011
- Posts:
- 947
- Downloads:
- 61
- Uploads:
- 266
- Thanks:
- 452
- Thanked:
- 107 times in 3 posts
May 5, 2012 at 7:57 pm #176759Ok, so now, it is serious.
I made a second post, because we have no solution yet.
I open a ticket a few days ago (critical), but no answer…I made a lot of test with all extensions up-to-date, and we have the following error, every time (in a local website too) :
Warning: preg_match() expects parameter 2 to be string, object given in E:xampp-173xampphtdocsjat3modulesmod_janewsprohelpersjaimage.php on line 382
See screenshot.
What can we do to fix this ??
dieudonne Frienddieudonne
- Join date:
- January 2011
- Posts:
- 947
- Downloads:
- 61
- Uploads:
- 266
- Thanks:
- 452
- Thanked:
- 107 times in 3 posts
May 7, 2012 at 8:11 am #451795Ok,
a big thank to Saguaros H for the solution :
<blockquote>Please try with attached file and let me know what happens.
It should be located in : modulesmod_janewsprohelpers</blockquote>
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
May 7, 2012 at 9:04 am #451807Hi, Dieudonne
I am not sure about your issue, unable to reproduce it.
So, you can use temporary solution as below:
Search and change
[PHP]preg_match($regex, $text, $matches);
$images = (count($matches)) ? $matches : array();
$image = count($images) > 1 ? $images[1] : ”;[/PHP]
To
[PHP]if(strtolen($text)>3){
preg_match($regex, $text, $matches);
$images = (count($matches)) ? $matches : array();
$image = count($images) > 1 ? $images[1] : ”;
}else{ $image = ”; }[/PHP]in modulesmod_janewsprohelpersjaimage.php file
Regards,
1 user says Thank You to HeR0 for this useful post
dieudonne Frienddieudonne
- Join date:
- January 2011
- Posts:
- 947
- Downloads:
- 61
- Uploads:
- 266
- Thanks:
- 452
- Thanked:
- 107 times in 3 posts
May 8, 2012 at 8:16 am #451972Hello,
but problem.
It is not working if there is any “ja news pro” modules on the home page.
We have the following error :Warning: preg_match() expects parameter 2 to be string, object given in /homez.92/eapnwsxr/www/j254/modules/mod_janews_featured/helpers/jaimage.php on line 383
Now it’s come from jaimage.php (in ja news featured)
So what can we do to fix this ?
Thank in advance for any help.
@hung Phungwe try to change the file modulesmod_janewsprohelpersjaimage.php file
delete :
[PHP] preg_match($regex, $text, $matches);
$images = (count($matches)) ? $matches : array();
$image = count($images) > 1 ? $images[1] : ”;[/PHP]and place this in place
[PHP]if(strtolen($text)>3){
preg_match($regex, $text, $matches);
$images = (count($matches)) ? $matches : array();
$image = count($images) > 1 ? $images[1] : ”;
}else{ $image = ”; }[/PHP]but we have a fatal error :
Fatal error: Call to undefined function strtolen() in /homez.92/eapnwsxr/www/j254/modules/mod_janews_featured/helpers/jaimage.php on line 510dieudonne Frienddieudonne
- Join date:
- January 2011
- Posts:
- 947
- Downloads:
- 61
- Uploads:
- 266
- Thanks:
- 452
- Thanked:
- 107 times in 3 posts
May 8, 2012 at 8:36 am #451981Ok, thank to Saguaros :
<blockquote>you should also replace ‘jaimage.php’ file in JA News Featured module. Please try with attached file.</blockquote>
Thank.
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
AuthorPostsViewing 6 posts - 1 through 6 (of 6 total)This topic contains 6 replies, has 2 voices, and was last updated by HeR0 12 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Warning: preg_match() expects parameter 2 to be string, object given in
Viewing 6 posts - 1 through 6 (of 6 total)