]> granicus.if.org Git - php/commitdiff
Fix issue with int vs long parameter
authorAnthony Ferrara <ircmaxell@gmail.com>
Thu, 5 Jul 2012 21:31:40 +0000 (17:31 -0400)
committerAnthony Ferrara <ircmaxell@gmail.com>
Thu, 5 Jul 2012 21:31:40 +0000 (17:31 -0400)
ext/standard/password.c

index 9bfb02358436c6068c6ee1d9e01f05c6e8566bac..6da656c5afed9778cb8a4fb9d178607df831e197 100644 (file)
@@ -266,7 +266,8 @@ Hash a password */
 PHP_FUNCTION(password_hash)
 {
        char *hash_format, *hash, *salt, *password, *result;
-       int algo = 0, salt_len = 0, required_salt_len = 0, hash_format_len, password_len;
+       long algo = 0;
+       int salt_len = 0, required_salt_len = 0, hash_format_len, password_len;
        HashTable *options = 0;
        zval **option_buffer;
 
@@ -297,7 +298,7 @@ PHP_FUNCTION(password_hash)
                }
                break;
                default:
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown password hashing algorithm: %d", algo);
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown password hashing algorithm: %ld", algo);
                        RETURN_NULL();
        }