humanmade / S3-Uploads

The WordPress Plugin to Store Uploads on Amazon S3
1.95k stars 391 forks source link

Deprecated error warning #482

Closed younggrandpa closed 3 years ago

younggrandpa commented 3 years ago

Hello,

PHP Ver: PHP 7.4.12 WordPress Ver: 5.6 S3-Uploads Ver: 2.2.2

The errors below popped up when I was debugging an unrelated plugin that I was working on (_WPDEBUG was set to true). This is not a show stopper as such but I thought it might be important for you guys to know.

Deprecated: Array and string offset access syntax with curly braces is deprecated in /opt/bitnami/apps/xxxxx/wp-content/plugins/s3-uploads/lib/getid3/getid3.php on line 554 Deprecated: Array and string offset access syntax with curly braces is deprecated in /opt/bitnami/apps/xxxxx/wp-content/plugins/s3-uploads/lib/getid3/getid3.php on line 555

I didn't have time to investigate as "S3-Uploads" plugin works just fine.

Cheers. YG

rubas commented 3 years ago

Same here. It started with PHP 7.4.

  1. Deprecated: Array and string offset access syntax with curly braces is deprecated Stacktrace

  2. Deprecated: Function get_magic_quotes_runtime() is deprecated Stacktrace

https://www.php.net/manual/de/migration74.deprecated.php


Reference #472

anhducbkhn commented 3 years ago

Same here, my php version 7.4.13

Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/wp-content/plugins/S3-Uploads/lib/getid3/getid3.php on line 554
Deprecated: Array and string offset access syntax with curly braces is deprecated in /var/www/wp-content/plugins/S3-Uploads/lib/getid3/getid3.php on line 555

I checked getid3 lib, it looks like, they fixed it.

https://github.com/JamesHeinrich/getID3/blob/master/getid3/getid3.php#L567

$this->info['id3v2']['majorversion']  = ord($header[3]);
$this->info['id3v2']['minorversion']  = ord($header[4]);

we should upgrade getid3 lib.

rmccue commented 3 years ago

Duplicate of #472, see https://github.com/humanmade/S3-Uploads/issues/472#issuecomment-742551228