opencats / OpenCATS

Applicant Tracking System (maintained code base)
http://www.opencats.org
Other
532 stars 245 forks source link

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

Open amaisonneuve opened 5 years ago

amaisonneuve commented 5 years ago

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 commented 5 years ago

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

shantadam commented 5 years ago

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.

RussH commented 5 years ago

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

amaisonneuve commented 5 years ago

No prob.

Also can you add me to slack?

On Oct 3, 2019, 03:21, at 03:21, RussH notifications@github.com 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

RussH commented 5 years ago

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.