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

Problem patching simple tables #15

Closed
gonzaloserrano opened this issue Mar 2, 2015 · 3 comments
Closed

Problem patching simple tables #15

gonzaloserrano opened this issue Mar 2, 2015 · 3 comments

Comments

@gonzaloserrano
Copy link

Hi,

I have the following code: https://gist.github.com/gonzaloserrano/07948738bd3abc91545b

I'm trying to patch this table:

$remoteTable = [
    ['col1', 'col2', 'col3', 'col4', 'col5', 'col6'],
    [0, 0, 0, 0, 2, 0]
];

into this one:

$localTable = [
    ['col1', 'col2', 'col3', 'col4', 'col5', 'col6'],
    [0, 0, 0, 0, 1, 0]
];

And i have errors similar to:

PHP Notice:  Undefined offset: 3 in /Users/gonzalo/dev/sp/config-manager-backend/vendor/paulfitz/daff-php/gen/lib/coopy/PhpTableView.class.php on line 131

Notice: Undefined offset: 3 in /Users/gonzalo/dev/sp/config-manager-backend/vendor/paulfitz/daff-php/gen/lib/coopy/PhpTableView.class.php on line 131
PHP Notice:  Undefined offset: 3 in /Users/gonzalo/dev/sp/config-manager-backend/vendor/paulfitz/daff-php/gen/lib/coopy/PhpTableView.class.php on line 132

Notice: Undefined offset: 3 in /Users/gonzalo/dev/sp/config-manager-backend/vendor/paulfitz/daff-php/gen/lib/coopy/PhpTableView.class.php on line 132
PHP Notice:  Undefined offset: 3 in /Users/gonzalo/dev/sp/config-manager-backend/vendor/paulfitz/daff-php/gen/lib/coopy/PhpTableView.class.php on line 133

If you remove ANY column from the tables except the 5th (which is the one which has the change) it works flawlessly, but like its found in the gist it gives those errors.

I'm using last master version which has the 1.2.4 commit message on it.

Thanks!

paulfitz added a commit to paulfitz/daff that referenced this issue Mar 3, 2015
This problem was reported in paulfitz/daff-php#15

It showed up in PHP first because a sorting operation had a
non-deterministic component and behaved differently in PHP
to other languages.  This commit also nails down that operation.
@paulfitz
Copy link
Owner

paulfitz commented Mar 3, 2015

Thanks for reporting this @gonzaloserrano. Replicated and working on a fix.

@paulfitz
Copy link
Owner

paulfitz commented Mar 3, 2015

Should be fixed in 1.2.5, please reopen if not.

@paulfitz paulfitz closed this as completed Mar 3, 2015
@gonzaloserrano
Copy link
Author

The test i did now works file, will report if i find any further problems. Thanks!

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