OpenCATS icon indicating copy to clipboard operation
OpenCATS copied to clipboard

Develop Branch Currently Broken - Trying to get property 'connect_errno'

Open amaisonneuve opened this issue 6 years ago • 5 comments

Expected behavior and actual behavior.

Installer completes successfully

Steps to reproduce the problem.

Fresh Install

Step 3: Loading Data Fails

What version of opencats are you running?

Release or downloaded from Git?

Git Development branch

WAMP or LAMP?

WAMP

What version of PHP and MySQL are you running

PHP 7.2.18

5.7.26 - MySQL Community Server

attach appropriate error logs. Please attach [apache/mysql] error/access logs as needed.

( ! ) Notice: Trying to get property 'connect_errno' of non-object in D:\dev\OpenCATS\modules\install\ajax\ui.php on line 1118Call Stack#TimeMemoryFunctionLocation10.0000408032{main}( )...\ajax.php:020.0005450944include( 'D:\dev\OpenCATS\modules\install\ajax\ui.php' )...\ajax.php:11530.0189554432MySQLQueryMultiple( )...\ui.php:76140.0189640824MySQLQuery( )...\ui.php:1150( ! ) Notice: Trying to get property 'connect_error' of non-object in D:\dev\OpenCATS\modules\install\ajax\ui.php on line 1119Call Stack#TimeMemoryFunctionLocation10.0000408032{main}( )...\ajax.php:020.0005450944include( 'D:\dev\OpenCATS\modules\install\ajax\ui.php' )...\ajax.php:11530.0189554432MySQLQueryMultiple( )...\ui.php:76140.0189640824MySQLQuery( )...\ui.php:1150 ( ! ) Notice: Trying to get property 'connect_errno' of non-object in D:\dev\OpenCATS\modules\install\ajax\ui.php on line 1118 Call Stack # Time Memory Function Location 1 0.0000 408032 {main}( ) ...\ajax.php:0 2 0.0005 450944 include( 'D:\dev\OpenCATS\modules\install\ajax\ui.php' ) ...\ajax.php:115 3 0.0189 554432 MySQLQueryMultiple( ) ...\ui.php:761 4 0.0189 640824 MySQLQuery( ) ...\ui.php:1150 ( ! ) Notice: Trying to get property 'connect_error' of non-object in D:\dev\OpenCATS\modules\install\ajax\ui.php on line 1119 Call Stack # Time Memory Function Location 1 0.0000 408032 {main}( ) ...\ajax.php:0 2 0.0005 450944 include( 'D:\dev\OpenCATS\modules\install\ajax\ui.php' ) ...\ajax.php:115 3 0.0189 554432 MySQLQueryMultiple( ) ...\ui.php:761 4 0.0189 640824 MySQLQuery( ) ...\ui.php:1150

1 | 0.0000 | 408032 | {main}( ) | ...\ajax.php:0 2 | 0.0005 | 450944 | include( 'D:\dev\OpenCATS\modules\install\ajax\ui.php' ) | ...\ajax.php:115 3 | 0.0189 | 554432 | MySQLQueryMultiple( ) | ...\ui.php:761 4 | 0.0189 | 640824 | MySQLQuery( ) | ...\ui.php:1150

1 | 0.0000 | 408032 | {main}( ) | ...\ajax.php:0 2 | 0.0005 | 450944 | include( 'D:\dev\OpenCATS\modules\install\ajax\ui.php' ) | ...\ajax.php:115 3 | 0.0189 | 554432 | MySQLQueryMultiple( ) | ...\ui.php:761 4 | 0.0189 | 640824 | MySQLQuery( ) | ...\ui.php:1150

MySQL Query Failed: errno: , error:

amaisonneuve avatar Oct 02 '19 17:10 amaisonneuve

Sorry i pushed this right to the development branch.. and not via a PR..

amaisonneuve avatar Oct 02 '19 19:10 amaisonneuve

Unfortunately, I will have to object to this change. The reason why is the fact that mysqli_connect_errno() exists for the main purpose of gracefully handling mysql errors, instead of explicitly referencing a variable $mySQLConnection->connect_errno, which may be set or not (i.e. isset()). Please see a proper logic handling on lines 1073-1084 in this same file.

shantadam avatar Oct 03 '19 03:10 shantadam

Alain, can you revert and then submit as a pr that can be reviewed?

RussH avatar Oct 03 '19 07:10 RussH

No prob.

Also can you add me to slack?

On Oct 3, 2019, 03:21, at 03:21, RussH [email protected] wrote:

Alain, can you revert and then submit as a pr that can be reviewed?

-- You are receiving this because you were assigned. Reply to this email directly or view it on GitHub: https://github.com/opencats/OpenCATS/issues/451#issuecomment-537821447

amaisonneuve avatar Oct 03 '19 11:10 amaisonneuve

you're still in there (opencats.slack.com) - maybe you have a new email addr? email me with your new email account and I'll send an invite.

RussH avatar Oct 03 '19 12:10 RussH