• Resolved cwolff

    (@cwolff)


    We are getting many of the following entries in our php error log file:

    [18-Jan-2017 18:19:19 UTC] PHP Warning: Parameter 2 to M_DataMapper::set_custom_wp_query_groupby() expected to be a reference, value given in E:\drugcourt\drugcourt-cms\wp-includes\class-wp-hook.php on line 298
    [18-Jan-2017 18:19:19 UTC] PHP Warning: Parameter 2 to M_DataMapper::set_custom_wp_query_fields() expected to be a reference, value given in E:\drugcourt\drugcourt-cms\wp-includes\class-wp-hook.php on line 298
    [18-Jan-2017 18:19:19 UTC] PHP Warning: Parameter 2 to M_DataMapper::set_custom_wp_query() expected to be a reference, value given in E:\drugcourt\drugcourt-cms\wp-includes\class-wp-hook.php on line 298

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor photocrati

    (@photocrati)

    @cwolff

    Please share the information under Gallery > Overview | Site Details … specifically the PHP version although the other details may be relevant.

    Thanks!

    – Cais.

    • This reply was modified 9 years, 4 months ago by photocrati.
    Thread Starter cwolff

    (@cwolff)

    Thank you Cals…..

    Operating System : WINNT (64 Bit)
    Server : Microsoft-IIS/7.5
    Memory usage : 6.63 MByte
    MYSQL Version : 5.6.17
    SQL Mode : NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    PHP Version : 7.1.0
    PHP Safe Mode : Off
    PHP Allow URL fopen : On
    PHP Memory Limit : 128
    PHP Max Upload Size : 8M
    PHP Max Post Size : 8M
    PCRE Backtracking Limit : 1000000
    PHP Max Script Execute Time : 300s
    PHP Exif support : Yes (V1.4 )
    PHP IPTC support : Yes
    PHP XML support : Yes

    Plugin Contributor photocrati

    (@photocrati)

    @cwolff – I was afraid of that, it looks like PHP 7.1 may be behind the error messages you are getting. I hate to ask this as I applaud sites being kept as current as possible but can you possibly test with a different environment using an older version (PHP 7.0.x should be fine).

    As it is, I’m going to write up an issue to review possible PHP 7.1 problems for our developers to further review and address.

    Thanks!

    – Cais.

    I am also getting this error on my site, and when I search for the errors I find many other sites showing the error. My host has updated to PHP 7.1 so I cannot just revert to an old version.

    I believe I have fixed this issue by modifying products/photocrati_nextgen/modules/datamapper/module.datamapper.php

    To bypass the error, remove the & symbol from before $wp_query on lines 41, 67, 85, and 102. This will eliminate the error for set_custom_qp_query(), set_custom_wp_query_fields(), set_custom_qp_query_where(), and set_custom_qp_query_groupby().

    I have not gotten this error in reference to the add_post_title_where_clauses() and add_post_name_where_clauses() functions, but it would probably be a good idea to perform this change on lines 152 and 174 as well. As far as I can tell, none of these functions need to be passing by reference, so this change should be fine.

    Plugin Contributor photocrati

    (@photocrati)

    @victorbargains – Thanks for sharing your findings and work-around!

    – Cais.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Warnings constantly written to php error logs’ is closed to new replies.