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

Fatal while adding tags #9278

Closed
wants to merge 1 commit into from
Closed

Fatal while adding tags #9278

wants to merge 1 commit into from

Conversation

vytsci
Copy link
Contributor

@vytsci vytsci commented Jul 7, 2018

This fatal error occurs when $data variable happens to be empty, commonly when used with import addons.

Questions Answers
Branch? Use the "develop" branch if you target the next major version of PrestaShop 1.7, "1.7.4.x" for 1.7 bug fixes, and "1.6.1.x" for PrestaShop 1.6 (bugfixes only).
Description? Please be specific when describing the PR.
Every detail helps: versions, browser/server configuration, specific module/theme, etc.
Type? bug fix / improvement / new feature
Category? See the Category list, i.e.: BO
BC breaks? Does it break backward compatibility? yes/no
Deprecations? Does it deprecate an existing feature? yes/no
Fixed ticket? (optional) If this PR fixes a Forge ticket, please add its complete Forge URL.
How to test? Please indicate how to best verify that this PR is correct.

Important guidelines


This change is Reviewable

This fatal error occurs when $data variable happens to be empty, commonly when used with import addons.
@prestonBot
Copy link
Collaborator

Hello @vytsci!

This is your first pull request on the PrestaShop project. Thank you, and welcome to this Open Source community!

@prestonBot
Copy link
Collaborator

Hi!

Your pull request description seems to be incomplete or malformed:

  • The category should be one of: FO, BO, CO, IN, TE, WS, LO

Would you mind completing the contribution table ? This would help us understand how interesting your contribution is.

Thank you!

(note: this is an automated message, but answering it will reach a real human )

@prestonBot prestonBot added the Bug fix Type: Bug fix label Jul 7, 2018
@mickaelandrieu mickaelandrieu added Missing information Resolution: issue closed because missing requested information and removed Bug fix Type: Bug fix labels Jul 7, 2018
@Matt75
Copy link
Contributor

Matt75 commented Jul 9, 2018

What did you thinks about this another syntax ?

        $data = array();
        foreach ($list as $tag) {
            $data[] = array(
                'id_tag' => (int)$tag,
                'id_product' => (int)$id_product,
                'id_lang' => (int)$id_lang
            );
        }
        $result = Db::getInstance()->insert('product_tag', $data);

If $data is empty, Db::insert() return true, maybe this can be more readable ?

@MathiasReker
Copy link
Contributor

What is status on this?

@MathiasReker
Copy link
Contributor

This can be closed

@eternoendless
Copy link
Member

Replaced by #10448

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing information Resolution: issue closed because missing requested information
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants