Skip to content

Notice: Undefined index: compiling_options #209

@alianschiavoncini

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

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