]> granicus.if.org Git - php/commit
Don't assert mysql->mysql is non-null
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 14 Aug 2020 10:44:13 +0000 (12:44 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 14 Aug 2020 10:44:13 +0000 (12:44 +0200)
commitce38d3a919c1363efbeb592d77df5f255f205419
tree61156dbad2deef190f285d7342cffa03d81031e5
parent196671a2b2505f042de3790ae5830121c7feb475
Don't assert mysql->mysql is non-null

There is an edge case in constructor behavior where we can end up
with mysql->mysql being NULL (rather than mysql itself already being
NULL). I think that ultimately that's a bug in the constructor code,
and we should probably be destroying the outer structure on
construction failure as well. However it's pretty hard to unravel
with when considering all the construction permutations.
ext/mysqli/php_mysqli_structs.h
ext/mysqli/tests/mysqli_incomplete_initialization.phpt [new file with mode: 0644]