Permalink
Browse files

changes is_int checks on domain id to be is_numeric as the string ver…

…sion of the domain id is still valid as the class only converts it to a string anyway
  • Loading branch information...
1 parent fc41336 commit 1179d9accd7ffcc3930bf24b7c1aa81ae8ba4cca @snider committed Sep 8, 2011
Showing with 7 additions and 7 deletions.
  1. +7 −7 rackDNS.php
View
@@ -134,7 +134,7 @@ public function list_domains($limit = 10, $offset = 0) {
* @return boolean|Ambiguous <multitype:, NULL, mixed>
*/
public function list_subdomains($domainID) {
- if ($domainID == false || ! is_int ( $domainID )) {
+ if ($domainID == false || ! is_numeric ( $domainID )) {
return false;
}
@@ -149,7 +149,7 @@ public function list_subdomains($domainID) {
* @return boolean|Ambigous <multitype:, NULL, mixed>
*/
public function list_records($domainID) {
- if ($domainID == false || ! is_int ( $domainID )) {
+ if ($domainID == false || ! is_numeric ( $domainID )) {
return false;
}
@@ -164,7 +164,7 @@ public function list_records($domainID) {
* @return boolean|Ambigous <multitype:, NULL, mixed>
*/
public function list_record_details($domainID, $recordID) {
- if ($domainID == false || ! is_int ( $domainID ) || $recordID == false) {
+ if ($domainID == false || ! is_numeric ( $domainID ) || $recordID == false) {
return false;
}
@@ -179,7 +179,7 @@ public function list_record_details($domainID, $recordID) {
* @return boolean|Ambigous <multitype:, NULL, mixed>
*/
public function delete_domain_record($domainID, $recordID) {
- if (($domainID == false || ! is_int ( $domainID ) )|| $recordID == false) {
+ if (($domainID == false || ! is_numeric ( $domainID ) || $recordID == false) {
return false;
}
@@ -267,7 +267,7 @@ public function list_domain_search($domain = false) {
* @param bool $showSubdomains
*/
public function list_domain_details($domainID = false, $showRecords = false, $showSubdomains = false) {
- if ($domainID == false || ! is_int ( $domainID )) {
+ if ($domainID == false || ! is_numeric ( $domainID )) {
return false;
}
@@ -285,7 +285,7 @@ public function list_domain_details($domainID = false, $showRecords = false, $sh
* @return boolean|array
*/
public function domain_export($domainID = false) {
- if ($domainID == false || ! is_int ( $domainID )) {
+ if ($domainID == false || ! is_numeric ( $domainID )) {
return false;
}
@@ -315,7 +315,7 @@ public function domain_export($domainID = false) {
* @return boolean|array
*/
public function modify_domain($domainID = false, $email = false, $ttl = 86400, $comment = null) {
- if ($domainID == false || ! is_int ( $domainID ) || ! is_int ( $ttl ) || $ttl < 300) {
+ if ($domainID == false || ! is_numeric ( $domainID ) || ! is_int ( $ttl ) || $ttl < 300) {
return false;
}

0 comments on commit 1179d9a

Please sign in to comment.