Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Simple flexible - Illegal offset type #10

Closed
nlemoine opened this issue Aug 31, 2018 · 10 comments
Closed

Simple flexible - Illegal offset type #10

nlemoine opened this issue Aug 31, 2018 · 10 comments
Labels
bug Something isn't working

Comments

@nlemoine
Copy link
Contributor

I get a warning here: https://github.com/BeAPI/bea-beautiful-flexible/blob/master/classes/main.php#L68

$layout_field is an array and can't be used as an array key. I didn't submit a PR because I didn't dig further and don't know what this condition is here to prevent. Did you mean by chance:

if ( $keys [ $layout_field['key'] ] ) {
	continue;
}

?

Let me know if you need more informations.

Version information

  • Plugin version : 1.0.3
  • ACF version : 5.7.4
  • PHP : 7.1
  • WordPress : 4.9.8

Steps to reproduce

  1. Create a flexible
  2. Use this plugin
  3. Visit any page containing the flexible field

What was expected

No notice or warning.

What happened instead

Illegal offset type in /path/to/plugins/bea-beautiful-flexible/classes/main.php on line 69

@MaximeCulea
Copy link
Contributor

@nlemoine thank you for the issue submitting.

Visit any page containing the flexible field

Where, in front or dashboard ?

Just to know, that was intented to prevent working on existing keys. Without debugging, I can't be sure what is the good way to fix, but 2 possibilities :

  • ! empty( $keys [ $layout_field ] )
  • isset( $keys [ $layout_field ] )

If you have time to debbug and make a PR, that's cool. Otherwise I'll have a look into this.
Thank you

@nlemoine
Copy link
Contributor Author

nlemoine commented Sep 3, 2018

Hello @MaximeCulea, see the PR and let me know if some changes are required.

@dominikkucharski
Copy link

dominikkucharski commented Sep 28, 2018

@nlemoine thank you for the issue submitting.

Visit any page containing the flexible field

Where, in front or dashboard ?

Just to know, that was intented to prevent working on existing keys. Without debugging, I can't be sure what is the good way to fix, but 2 possibilities :

  • ! empty( $keys [ $layout_field ] )
  • isset( $keys [ $layout_field ] )

If you have time to debbug and make a PR, that's cool. Otherwise I'll have a look into this.
Thank you

Problem is visible on the post edit screen when WP_DEBUG option is set to true.

zrzut ekranu 2018-09-28 o 17 25 52

MaximeCulea added a commit that referenced this issue Oct 5, 2018
@MaximeCulea
Copy link
Contributor

@nlemoine and @dominikkucharski, this has been fixed fe55428

FYI, it will be launched into the next release.

@MaximeCulea MaximeCulea added Next Release and removed bug Something isn't working labels Oct 5, 2018
@MaximeCulea MaximeCulea removed their assignment Oct 5, 2018
@nlemoine
Copy link
Contributor Author

nlemoine commented Oct 6, 2018

Great news! Thanks.

@MaximeCulea
Copy link
Contributor

New release (1.0.4) just launched.

@dominikkucharski
Copy link

Unfortunately, this issue is not fixed. I still see the same error.

@MaximeCulea MaximeCulea reopened this Oct 17, 2018
@MaximeCulea MaximeCulea added bug Something isn't working and removed Next Release labels Oct 17, 2018
@MaximeCulea
Copy link
Contributor

Hello @dominikkucharski, thank for the feedback. I reopen the issue.
Have you some more details to provide ?
Do you think it's the same warning ?
Thank you

@dominikkucharski
Copy link

I think it's the same warning.

I've disabled all plugins except bea-beautiful-flexible and ACF Pro in the latest version and when I go to the screen creating a new field Groups I see this:

zrzut ekranu 2018-10-17 o 13 08 56

I'm using PHP 7.1.2

@MaximeCulea
Copy link
Contributor

@dominikkucharski Corrected into 1.0.5.
Thank you for your understanding.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants