Skip to content

Conversation

@kraftbj
Copy link
Contributor

@kraftbj kraftbj commented Dec 18, 2024

Initial run at adding basic phpcs checks via GitHub Actions and Husky pre-commit hooks.

Testing: Create a PR into this branch with a PHP change. One change should be adding new code without error. One should be adding new code with an error. Another should be adding new code on a line with an existing error.

Test PR: kraftbj/secure-custom-fields#1

Copy link

@anomiex anomiex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave it a quick once-over.

Copy link

@anomiex anomiex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me.

@kraftbj kraftbj merged commit 1c6c0d4 into trunk Dec 18, 2024
1 check passed
@kraftbj kraftbj deleted the add/phpcs-checks branch December 18, 2024 20:42
@kraftbj kraftbj added this to the 6.4.1 milestone Mar 3, 2025
JimChr-R4GN4R added a commit to JimChr-R4GN4R/secure-custom-fields that referenced this pull request Oct 27, 2025
handled a bug about repeater:
```
Uncaught TypeError: Cannot access offset of type string on string
Stack trace:
#0 /wp-includes/class-wp-hook.php(324): acf_field_repeater->format_value(Array, 1911, Array, false)
WordPress#1 /wp-includes/plugin.php(256): WP_Hook->apply_filters(Array, Array)
WordPress#2 /wp-content/plugins/secure-custom-fields/includes/acf-hook-functions.php(110): apply_filters_ref_array('acf/format_valu...', Array)
WordPress#3 /wp-includes/class-wp-hook.php(324): _acf_apply_hook_variations(Array, 1911, Array, false)
WordPress#4 /wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
#5 /wp-content/plugins/secure-custom-fields/includes/acf-value-functions.php(191): apply_filters('acf/format_valu...', Array, 1911, Array, false)
WordPress#6 /wp-content/plugins/secure-custom-fields/includes/rest-api/class-acf-rest-api.php(242): acf_format_value(Array, 1911, Array)
WordPress#7 /wp-includes/rest-api/endpoints/class-wp-rest-controller.php(439): ACF_Rest_Api->load_fields(Array, 'acf', Object(WP_REST_Request), 'modules')
WordPress#8 /wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(2104): WP_REST_Controller->add_additional_fields_to_object(Array, Object(WP_REST_Request))
WordPress#9 /wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(661): WP_REST_Posts_Controller->prepare_item_for_response(Object(WP_Post), Object(WP_REST_Request))
WordPress#10 /wp-includes/rest-api/class-wp-rest-server.php(1292): WP_REST_Posts_Controller->get_item(Object(WP_REST_Request))
WordPress#11 /wp-includes/rest-api/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/wp/v2/modules/...', Array, NULL)
WordPress#12 /wp-includes/rest-api.php(586): WP_REST_Server->dispatch(Object(WP_REST_Request))
WordPress#13 /wp-includes/rest-api.php(2973): rest_do_request(Object(WP_REST_Request))
WordPress#14 internal function: rest_preload_api_request(Array, '/wp/v2/modules/...')
WordPress#15 /wp-includes/block-editor.php(754): array_reduce(Array, 'rest_preload_ap...', Array)
WordPress#16 /wp-admin/edit-form-blocks.php(114): block_editor_rest_api_preload(Array, Object(WP_Block_Editor_Context))
WordPress#17 /wp-admin/post.php(187): require('/w...')
WordPress#18 {main} thrown in /wp-content/plugins/secure-custom-fields/includes/fields/class-acf-field-repeater.php on line 426
Plugin: Secure Custom Fields
File: /wp-content/plugins/secure-custom-fields/includes/fields/class-acf-field-repeater.php
Line: 426
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants