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

Modifications error=skip bug #3532

Closed
howdu opened this issue Oct 21, 2015 · 2 comments
Closed

Modifications error=skip bug #3532

howdu opened this issue Oct 21, 2015 · 2 comments

Comments

@howdu
Copy link
Contributor

howdu commented Oct 21, 2015

if (!$status) {
    // Log
    $log[] = 'NOT FOUND!';

    // Skip current operation
    if ($error == 'skip') {
        break;
    }

    // Abort applying this modification completely.
    if ($error == 'abort') {
        $modification = $recovery;

        // Log
        $log[] = 'ABORTING!';

        break 5;
    }
}

I think the $error == 'skip' should be continue instead of break.

It should continue to the next operation if there is a error, at the moment it is skipping to the next file and missing out any operations below.

E.g the third operation wil not get modified due to the error="skip" above it.

<file path="catalog/view/theme/*/template/product/product.tpl">
    <operation>
      <search><![CDATA[<?php echo $price; ?>]]></search>
      <add position="replace"></add>
    </operation>
    <operation error="skip">
      <search><![CDATA[<?php echo $reward1234; ?>]]></search>
      <add position="replace"></add>
    </operation>
    <operation>
      <search><![CDATA[<?php echo $footer; ?>]]></search>
      <add position="replace"></add>
@danielkerr
Copy link
Member

thats what you think and you also did a pull request for it.

after i closed the pull request you now think its acceptable to open an issue!

stop wasting my time!

@howdu
Copy link
Contributor Author

howdu commented Oct 21, 2015

Even the comment says how it should work 'Skip current operation'

No pull request from me, must be somebody else who thinks the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants