Skip to content

Notice: Undefined index: compiling_options #209

Closed

Description

@alianschiavoncini

Hello,
first of all, let me say, thank you for your code, it's very useful!!!

Today, I got a fatal error due to a non existing array key $option_values['compiling_options'] at line 144, file wp-scss.php.

I replaced your wpscss_plugin_db_cleanup function with this additional code that checks if the array has the compiling_options before made any replacing.

function wpscss_plugin_db_cleanup($option_values){
	if( array_key_exists('compiling_options', $option_values) ) {
		$compiling_options = str_replace("Leafo", "ScssPhp", $option_values['compiling_options']);
		$compiling_options = str_replace("ScssPhp\\ScssPhp\\Formatter\\", "", $compiling_options);
		$compiling_options = str_replace(["Compact", "Crunched"], "compressed", $compiling_options);
		$compiling_options = str_replace("Nested", "expanded", $compiling_options);
		$compiling_options = strtolower($compiling_options);
		$option_values['compiling_options'] = $compiling_options;
	}
  return $option_values;
}

Do you guess it could be implemented in your repository?

Moreover, why do you have the plugin pending review on WP repository?

Thank you,
Alian

Activity

  1. shadoath commented on Sep 1, 2021

    @shadoath
    Collaborator

    Glad to hear this plugin is very useful @alianschiavoncini.

    In version 2.3.0 we migrated the options for compiling. Leaving only Compressed and Expanded. Which lead me to add this check. Thank you for the additional logic to only run if needed.

    As for the Pending state, that was removed yesterday! You can view this issue #203 to learn more.

  2. alianschiavoncini commented on Sep 1, 2021

    @alianschiavoncini
    Author

    @shadoath thank you for reply!

  3. shadoath commented on Sep 8, 2021

    @shadoath
    Collaborator

    Merged up. closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions