phpcompat icon indicating copy to clipboard operation
phpcompat copied to clipboard

False Positive: Amazon Web Services plugin from Delicious Brains

Open tonydjukic opened this issue 8 years ago • 2 comments

Compatibility check throws multiple errors regarding the use of 'resource' in the AWS plugin's code and resource being a reserved keyword in PHP 7.

After reviewing the code for the AWS plugin it appears that 'resource' is only ever used in file paths to vendor assets and not for any executable code.

I suspect this is a false positive.

tonydjukic avatar Mar 08 '17 23:03 tonydjukic

Could you show some example code ?

If you mean that resource is used as part of a namespace, see: http://php.net/manual/en/reserved.other-reserved-words.php

jrfnl avatar Mar 09 '17 00:03 jrfnl

FILE: /opt/bitnami/apps/wordpress/htdocs/wp-content/plugins/amazon-web-services/vendor/aws/Guzzle/Service/Resource/CompositeResourceIteratorFactory.php
FOUND 1 ERROR AFFECTING 1 LINE
 3 | ERROR | 'resource' is a reserved keyword as of PHP version 7.0 and cannot be used to name a class, interface or trait or as part of a namespace (T_NAMESPACE)

However, upon further examination, it appears that the plugin simply has a library of vendor assets and some of them are in directories with the name 'Resource' in the URL path.

tonydjukic avatar Mar 09 '17 01:03 tonydjukic