airesvsg / acf-to-rest-api

Exposes Advanced Custom Fields Endpoints in the WordPress REST API
https://wordpress.org/plugins/acf-to-rest-api/
1.33k stars 111 forks source link

PHP 7.2 Getting error when trying to view plugins list page #298

Open zimgodo opened 5 years ago

zimgodo commented 5 years ago

Hi,

I’m trying to upgrade my local PHP to 7.2 before moving to production and I received below error:

Fatal error: Uncaught Error: Unsupported operand types in /htdocs/wp-content/plugins/acf-to-rest-api/shared/lib/class-acf-to-rest-api-settings.php:46 Stack trace: #0 /htdocs/wp-includes/class-wp-hook.php(288): ACF_To_REST_API_Settings::plugin_action_links('<') #1 /htdocs/wp-includes/plugin.php(203): WP_Hook->apply_filters('<', Array) #2 /htdocs/wp-admin/includes/class-wp-plugins-list-table.php(714): apply_filters('plugin_action_l...', '<', 'acf-to-rest-api...', Array, 'all') #3 /htdocs/wp-admin/includes/class-wp-plugins-list-table.php(534): WP_Plugins_List_Table->single_row(Array) #4 /htdocs/wp-admin/includes/class-wp-list-table.php(1165): WP_Plugins_List_Table->display_rows() #5 /htdocs/wp-admin/includes/class-wp-list-table.php(1097): WP_List_Table->display_rows_or_placeholder() #6 /home/norkhairi/App in /htdocs/wp-content/plugins/acf-to-rest-api/shared/lib/class-acf-to-rest-api-settings.php on line 46

The value returned from $actions was string('<').

Switching back to PHP 5.6 and the error won’t show. This is affecting PHP version 7.0 and above.

Since PHP 5.6 is no longer maintained, would be best to have it compatible with PHP 7.0 (at least) and above.

Any help would be appreciated.

Thanks in advance.

airesvsg commented 5 years ago

Hi @zimgodo,

I identified whats happened. I'll fix that error soon as possible.

Thanks for your time