Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reporting always empty variables #2097

Closed
szepeviktor opened this issue Apr 27, 2019 · 1 comment
Closed

Reporting always empty variables #2097

szepeviktor opened this issue Apr 27, 2019 · 1 comment

Comments

@szepeviktor
Copy link
Contributor

Phan reported that $table_data is an undefined variable.
Could PHPStan also do so?

public static function populate_order_from_post_meta( $order ) {
  foreach ( WooCommerce_Custom_Orders_Table::get_postmeta_mapping() as $column => $meta_key ) {
    $meta = get_post_meta( $order->get_id(), $meta_key, true );

    if ( empty( $table_data->$column ) && ! empty( $meta ) ) {

Thank you for considering.

@ondrejmirtes
Copy link
Member

Duplicate of #970.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants