Skip to content

Commit

Permalink
Fix PHP Fatal error call to undefined function pg_fetch_array()
Browse files Browse the repository at this point in the history
  • Loading branch information
francoisjacquet committed Feb 25, 2024
1 parent fbe62ed commit 6a45e10
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Expand Up @@ -5,6 +5,7 @@ Changes in 11.4.4
-----------------
- Fix SQL transcript_grades view for History Marking Periods of existing school years in rosariosis.sql, rosariosis_mysql.sql & Update.fnc.php
- Fix regression since 11.4 check MP exists before trying to get GPA: include History Marking Periods in Grades.fnc.php
- Fix PHP Fatal error call to undefined function pg_fetch_array() in database.inc.php & AccessLog.php

Changes in 11.4.3
-----------------
Expand Down
8 changes: 5 additions & 3 deletions database.inc.php
Expand Up @@ -255,10 +255,12 @@ function db_fetch_row( $result )

$return = false;

if ( $DatabaseType === 'mysql'
&& $result instanceof mysqli_result )
if ( $DatabaseType === 'mysql' )
{
$return = mysqli_fetch_assoc( $result );
if ( $result instanceof mysqli_result )
{
$return = mysqli_fetch_assoc( $result );
}
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion modules/School_Setup/AccessLog.php
Expand Up @@ -42,7 +42,7 @@
{
// Only requested modname.
// @since 11.4 Automatically clear Access Log entries older than one year
DBGet( "DELETE FROM access_log
DBQuery( "DELETE FROM access_log
WHERE CREATED_AT<'" . date( 'Y-m-d', strtotime( '1 year ago' ) ) . "'" );
}

Expand Down

0 comments on commit 6a45e10

Please sign in to comment.