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

Another error diffing simple tables #17

Closed
gonzaloserrano opened this issue Mar 9, 2015 · 1 comment
Closed

Another error diffing simple tables #17

gonzaloserrano opened this issue Mar 9, 2015 · 1 comment

Comments

@gonzaloserrano
Copy link

Gist: https://gist.github.com/gonzaloserrano/f7aaa84f69dbb80d701e

$localTable = [
["fd", "df"],
["fd", "fd"],
[null, "fd"],
["fd", null],
];

against

$remoteTable = [
["A", "new_column_2"],
[null, null],
["fd", "df"],
["fd", "fd"],
];

shoots

Notice: Trying to get property of non-object in /Users/gonzalo/daff-test/vendor/paulfitz/daff-php/gen/lib/coopy/TableDiff.class.php on line 347
<table>
<thead>
<tr class="index"><td class="index">@:@</td><td></td><td>0:0</td><td>1:1</td></tr>
<tr class="spec"><td class="index"></td><td>!</td><td>(fd)</td><td>(df)</td></tr>
<tr class="header"><th class="index"></th><th>@@</th><th>A</th><th>new_column_2</th></tr>
</thead>
<tbody>
<tr class="add"><td class="index">-:1</td><td>+++</td><td></td><td></td></tr>
<tr><td class="index">0:2</td><td></td><td>fd</td><td>df</td></tr>
<tr><td class="index">1:3</td><td></td><td>fd</td><td>fd</td></tr>
<tr class="remove"><td class="index">2:-</td><td>---</td><td></td><td>fd</td></tr>
</tbody>
</table>

Edit: interestingly, if you remove last row from both tables, you get a Alignment.hx:277: Ordering took too long, something went wrong.

Thanks!

@paulfitz
Copy link
Owner

Should be fixed in 1.2.7, please reopen if persists. Tests added. Thanks @gonzaloserrano!

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