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

install/upgrade_run_2.1.27.php fails (Probably misnamed function call to mysql_num_rows()) #2003

Closed
wirerydr opened this issue Nov 9, 2017 · 2 comments

Comments

@wirerydr
Copy link

wirerydr commented Nov 9, 2017

Steps to reproduce

  1. Start an upgrade to development commit 20b5a5a.

Expected behaviour

Upgrade should complete successfully.

Actual behaviour

On screen Step 4, upgrade_run_2.1.27.php fails to complte. Instead it displays "Loop #1 is now running ..." with a spinning gear forever.
An error appears in the httpd logs:

[Thu Nov 09 13:34:14.496256 2017] [php7:notice] [pid 14614] [client 192.168.240.120:65462] PHP Fatal error:  Uncaught Error: Call to undefined function mysql_num_rows() in /opt/teampass/teampass__PROD/teampass__20171109-20b5a5a/install/upgrade_run_2.1.27.php:152\nStack t
race:\n#0 /opt/teampass/teampass__PROD/teampass__20171109-20b5a5a/install/upgrade_run_2.1.27.php(199): columnExists('teampass_misc', 'id')\n#1 {main}\n  thrown in /opt/teampass/teampass__PROD/teampass__20171109-20b5a5a/install/upgrade_run_2.1.27.php on line 152, referer:
 https://www.example/tp/install/upgrade.php

An examination of the TeamPass codebase indicates that this is the only call to mysql_num_rows() in the entire project. However numerous calls to mysqli_num_rows() exist. Presumably this is a simple function-name typo.

@nilsteampassnet
Copy link
Owner

Yes you are right.
I have included just now for robustifying the upgrade and introduced this mysql function instead of the mysqli.
What I don't understand is that no errors were shown during my test ...

nilsteampassnet added a commit that referenced this issue Nov 9, 2017
Fix for #2003
@wirerydr
Copy link
Author

Re-tested by upgrading to development commit b10561b, which includes your fix mentioned above. Upgrade completed successfully - closing this issue. Thanks for the quick fix.

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