Title: php 7,4 Deprecated: error
Last modified: June 29, 2020

---

# php 7,4 Deprecated: error

 *  [shadiadi](https://wordpress.org/support/users/shadiadi/)
 * (@shadiadi)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-74-deprecated-error/)
 * After updating to php 7.4 as recommended by WordPress i am getting the following
   error in my logs
    PHP Deprecated: Array and string offset access syntax with 
   curly braces is deprecated in xxx//plugins/image-regenerate-select-crop/image-
   regenerate-select-crop.php on line 950

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

 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-74-deprecated-error/#post-13047209)
 * Hi,
 * Thanks for letting me know. I will assess and push a fix.
 * Regards,
    Iulia
 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-74-deprecated-error/#post-13047420)
 * Please upgrade and let me know if this is still an issue for you.
 *  [dm10014](https://wordpress.org/support/users/dm10014/)
 * (@dm10014)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-74-deprecated-error/#post-13069446)
 * I’m getting that error with the latest plugin version. Lines 951 & 952.
    WP 5.4.2
   php 7.4.2
    -  This reply was modified 5 years, 11 months ago by [dm10014](https://wordpress.org/support/users/dm10014/).
 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-74-deprecated-error/#post-13070699)
 * Hi,
 * Just to be sure we are looking at the same piece of code:
 *     ```
       947		if ( version_compare( phpversion(), '7.4', '>=' ) ) {
       948			$c_v = $sc[0];
       949			$c_h = $sc[1];
       950		} else {
       951			$c_v = $sc{0};
       952			$c_h = $sc{1};
       953		}
       ```
   
 * If lines 951 & 952 are executed in your instance, it means you are not running
   PHP >= 7.4
 * I have testest up to 7.4.7 and I cannot replicate the issue. Please check what`
   phpversion()` and `version_compare( phpversion(), '7.4', '>=' )` return in your
   site, maybe these are not consistent. Are you using Apache or Nginx?
 * Regards,
    Iulia
    -  This reply was modified 5 years, 11 months ago by [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/).
 *  [dm10014](https://wordpress.org/support/users/dm10014/)
 * (@dm10014)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-74-deprecated-error/#post-13072039)
 * Yes, that’s the code. Definitely running php 7.4.2 via MAMP on localhost, with
   Apache 2.2.34. `phpversion()` returns 7.4.2; `version_compare( phpversion(), '
   7.4', '>=' )` returns true, so not sure why it’s even reading lines 951 & 952
 *  Plugin Author [Iulia Cazan](https://wordpress.org/support/users/iulia-cazan/)
 * (@iulia-cazan)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-74-deprecated-error/#post-13072072)
 * Yes, super weird :). Try to change the condition like `if ( true === version_compare(
   phpversion(), '7.4', '>=' ) ) {` to see if that changes something, maybe it’s
   a PHP 7.4.2 issue.
 *  [dm10014](https://wordpress.org/support/users/dm10014/)
 * (@dm10014)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-74-deprecated-error/#post-13072138)
 * Still throws the warning. Can’t upgrage to php 7.4.7 (on free MAMP, not PRO) 
   so for now will just comment out the else {}. It’s a mystery!

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

The topic ‘php 7,4 Deprecated: error’ is closed to new replies.

 * ![](https://ps.w.org/image-regenerate-select-crop/assets/icon-128x128.gif?rev
   =2371819)
 * [Image Regenerate & Select Crop](https://wordpress.org/plugins/image-regenerate-select-crop/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/image-regenerate-select-crop/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/image-regenerate-select-crop/)
 * [Active Topics](https://wordpress.org/support/plugin/image-regenerate-select-crop/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/image-regenerate-select-crop/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/image-regenerate-select-crop/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [dm10014](https://wordpress.org/support/users/dm10014/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/php-74-deprecated-error/#post-13072138)
 * Status: not resolved