Skip to content

Commit

Permalink
Add version check for info logos to support PHP 5.5: https://bugs.php…
Browse files Browse the repository at this point in the history
  • Loading branch information
13rac1 committed Nov 18, 2014
1 parent 8e9b8cc commit b333a39
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions pdo_4d.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@

/* {{{ phpinfo logo definitions */

#include "php_logos.h"
#if PHP_VERSION_ID < 50500
#include "php_logos.h"
#endif


static unsigned char pdo_4d_logo[] = {
Expand Down Expand Up @@ -87,10 +89,13 @@ PHP_INI_END()
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(pdo_4d)
{
php_register_info_logo("PDO_4D_LOGO_ID", "", pdo_4d_logo, 778);
#if PHP_VERSION_ID < 50500
/* register the logo */
php_register_info_logo("PDO_4D_LOGO_ID", "", pdo_4d_logo, 778);
#endif
REGISTER_INI_ENTRIES();
/* add your stuff here */

/* register 4d pdo driver */
if (FAILURE == php_pdo_register_driver(&pdo_4d_driver)) {
/* fprintf(stderr,"Error on register pdo-4d driver\n"); */
Expand All @@ -108,8 +113,10 @@ PHP_MINIT_FUNCTION(pdo_4d)
/* {{{ PHP_MSHUTDOWN_FUNCTION */
PHP_MSHUTDOWN_FUNCTION(pdo_4d)
{
php_unregister_info_logo("PDO_4D_LOGO_ID");

#if PHP_VERSION_ID < 50500
php_unregister_info_logo("PDO_4D_LOGO_ID");
#endif

php_pdo_unregister_driver(&pdo_4d_driver);
UNREGISTER_INI_ENTRIES();

Expand Down

0 comments on commit b333a39

Please sign in to comment.