Hi,

We are getting the following error when running PHPCompatibility for 7.2

FILE:
/var/www/docroot/sites/all/contrib/entity_translation/includes/translation.handler.inc

713 | ERROR | Since PHP 7.0, functions inspecting arguments, like
| | func_get_args(), no longer report the original value
| | as passed to a parameter, but will instead provide the
| | current value. The parameter "$translation" was
| | changed on line 687.

Are we having any plans to fix this?

Thanks and regards,
Mayank Patel

Comments

patelmayank7552 created an issue. See original summary.

patelmayank7552’s picture

Issue summary: View changes
patelmayank7552’s picture

Priority: Normal » Critical
stefanos.petrakis’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Thanks for this report, could you share some more info?

How does this error manifest itself?
Could you provide a case (would be important for reproducing errors)?
Why is this reported as critical?

sudheeshps’s picture

StatusFileSize
new830 bytes

@stefanos.petrakis this occurs when we run phpcompatibility tests on websites.
Most of the websites will perform this activity as php 7.1 deadline is declared.

This might be critical as all the codes scanned should pass the compatibility tests

I have added created a patch to fix the issue.

sudheeshps’s picture

Status: Postponed (maintainer needs more info) » Active
sudheeshps’s picture

Status: Active » Needs review
stefanos.petrakis’s picture

Status: Needs review » Needs work

Thanks for the patch.

2 remarks, even though this is a simple patch:
* We need a comment explaining that $args is going to be used later on in a call to notifyChildren(), since we are moving it away from that call
* I would add the $args = func_get_args(); after the exception handling to optimize things a bit.

sudheeshps’s picture

Status: Needs work » Needs review
StatusFileSize
new821 bytes

@stefanos.petrakis, Thanks for the feedback.

Both the comments are addressed, let me know if further changes are required.

stefanos.petrakis’s picture

Title: PHP 7.2 Compatibility » PHP 7.0 Compatibility
Issue tags: -PHP 7.2 +PHP 7.0 (duplicate)
stefanos.petrakis’s picture

Status: Needs review » Reviewed & tested by the community

  • stefanos.petrakis committed 53894ba on 7.x-1.x
    Issue #3025770 by sudheeshps, patelmayank7552, stefanos.petrakis: PHP 7....
stefanos.petrakis’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks for the help!

patelmayank7552’s picture

sudheeshps’s picture

@ stefanos.petrakis Great, Any idea when are we planning for next release.

stefanos.petrakis’s picture

@ sudheeshps : As there are no critical fixes in the current dev branch, the next release is not coming up in the near future (4-8 weeks roughly). Usually there is a rough number of ~10 (non-critical) fixes that triggers a new release and so far there are three commited fixes including this one.

joseph.olstad’s picture

@stefanos.petrakis , I think this fix justifies a new tagged release . 7.x-1.1

Please and thank you! :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

joseph.olstad’s picture

Hi Stefanos, we should probably prioritize a release for 7.x-1.1 simply due to this commit.
php 7.1.x is now the lowest recommended version for Drupal 7 that is supported by 'Zend'.
although other vendors like RedHat back port security fixes to older php versions, no guarantee that other vendors will.

stefanos.petrakis’s picture

Category: Bug report » Task