Browse files

Merge pull request #1 from LiamBailey/master

Use intval() instead of is_int() when checking for port number. Props @LiamBailey
  • Loading branch information...
2 parents 196a281 + 09f72ad commit 191342d901acf85e9561e2f37667b2e795d30ff8 @lesterchan committed Sep 24, 2013
Showing with 4 additions and 4 deletions.
  1. +1 −1 database-backup.php
  2. +1 −1 database-manage.php
  3. +2 −2 wp-dbmanager.php
View
2 database-backup.php
@@ -48,7 +48,7 @@
if(strpos(DB_HOST, ':') !== false) {
$db_host = explode(':', DB_HOST);
$backup['host'] = $db_host[0];
- if(is_int($db_host[1])) {
+ if(intval($db_host[1]) != 0) {
$backup['port'] = ' --port="'.intval($db_host[1]).'"';
} else {
$backup['sock'] = ' --socket="'.$db_host[1].'"';
View
2 database-manage.php
@@ -53,7 +53,7 @@
if(strpos(DB_HOST, ':') !== false) {
$db_host = explode(':', DB_HOST);
$backup['host'] = $db_host[0];
- if(is_int($db_host[1])) {
+ if(intval($db_host[1]) != 0) {
$backup['port'] = ' --port="'.intval($db_host[1]).'"';
} else {
$backup['sock'] = ' --socket="'.$db_host[1].'"';
View
4 wp-dbmanager.php
@@ -3,7 +3,7 @@
Plugin Name: WP-DBManager
Plugin URI: http://lesterchan.net/portfolio/programming/php/
Description: Manages your WordPress database. Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up, optimizing and repairing of database.
-Version: 2.63
+Version: 2.64
Author: Lester 'GaMerZ' Chan
Author URI: http://lesterchan.net
Text Domain: wp-dbmanager
@@ -88,7 +88,7 @@ function cron_dbmanager_backup() {
if(strpos(DB_HOST, ':') !== false) {
$db_host = explode(':', DB_HOST);
$backup['host'] = $db_host[0];
- if(is_int($db_host[1])) {
+ if(intval($db_host[1]) != 0) {
$backup['port'] = ' --port="'.intval($db_host[1]).'"';
} else {
$backup['sock'] = ' --socket="'.$db_host[1].'"';

0 comments on commit 191342d

Please sign in to comment.