joomla-framework / database

Joomla Framework Database Package
GNU General Public License v2.0
28 stars 35 forks source link

Only check types of postgres default values if set #259

Closed wilsonge closed 2 years ago

wilsonge commented 2 years ago

The field default can be null. If that is the case then the preg_match gives a PHP deprecation warning in PHP 8.1.

This can be seen at https://ci.joomla.org/joomla/joomla-cms/50349/1/31 phpnext-api-postgres test run

e.g.

  <b>Deprecated</b>:  preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in <b>/tests/www/postgresphpnext/libraries/vendor/joomla/database/src/Pgsql/PgsqlDriver.php</b> on line <b>273</b><br />
  <br />
  <b>Deprecated</b>:  preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in <b>/tests/www/postgresphpnext/libraries/vendor/joomla/database/src/Pgsql/PgsqlDriver.php</b> on line <b>279</b><br />
alikon commented 2 years ago

we have 2 pr for this issue the 1st #258

alikon commented 2 years ago

can we have merged at least one please

wilsonge commented 2 years ago

Oops my bad. Was going through drone issues last night, missed the other one