Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • dieudonne Friend
    #176759

    Ok, 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 ??


    1. 2012-05-05_21h56_12
    dieudonne Friend
    #451795

    Ok,

    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>


    1. jaimage.rar
    HeR0 Friend
    #451807

    Hi, 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,

    dieudonne Friend
    #451972

    Hello,

    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 Phung

    we 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 510

    dieudonne Friend
    #451981

    Ok, thank to Saguaros :

    <blockquote>you should also replace ‘jaimage.php’ file in JA News Featured module. Please try with attached file.</blockquote>

    Thank.


    1. jaimage.rar
    HeR0 Friend
    #451991

    Hi Dieudonne
    You should edit file image.php in ja_news_featured module as image.php ja_news_pro module. Because this is same issue on 2 files which is same 🙂

Viewing 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