phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected \"readConcern\" option to be %s, %s given",ZSTR_VAL(php_phongo_readconcern_ce->name),PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(option));
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected \"readPreference\" option to be %s, %s given",ZSTR_VAL(php_phongo_readpreference_ce->name),PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(option));
returnfalse;
}
if(zreadPreference){
*zreadPreference=option;
}
returntrue;
}/* }}} */
/* Parses the "session" option for an execute method. The client object should
* correspond to the Manager executing the operation and will be used to ensure
* that the session is correctly associated with that client. If mongoc_opts is
* not NULL, the option will be appended. If zsession is not NULL, it will be
* assigned to the option. On error, false is returned and an exception is
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected \"session\" option to be %s, %s given",ZSTR_VAL(php_phongo_session_ce->name),PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(option));
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected \"writeConcern\" option to be %s, %s given",ZSTR_VAL(php_phongo_writeconcern_ce->name),PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(option));
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Failed to parse URI options: '%s' authentication mechanism requires username.",mongoc_uri_get_auth_mechanism(uri));
returnfalse;
}
}
/* MONGODB-X509 errors if a password is supplied. */
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected maxStalenessSeconds to be >= %d, %"PRId64" given",MONGOC_SMALLEST_MAX_STALENESS_SECONDS,max_staleness_seconds);
mongoc_read_prefs_destroy(new_rp);
returnfalse;
}
if(max_staleness_seconds>INT32_MAX){
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected maxStalenessSeconds to be <= %d, %"PRId64" given",INT32_MAX,max_staleness_seconds);
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Failed to parse \"%s\" driver option","allow_invalid_hostname");
returnfalse;
}
php_error_docref(NULL,E_DEPRECATED,"The \"allow_invalid_hostname\" driver option is deprecated. Please use the \"tlsAllowInvalidHostnames\" URI option instead.");
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Failed to parse \"%s\" driver option","weak_cert_validation");
returnfalse;
}
php_error_docref(NULL,E_DEPRECATED,"The \"weak_cert_validation\" driver option is deprecated. Please use the \"tlsAllowInvalidCertificates\" URI option instead.");
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Failed to parse \"%s\" driver option","allow_self_signed");
returnfalse;
}
php_error_docref(NULL,E_DEPRECATED,"The \"allow_self_signed\" context driver option is deprecated. Please use the \"tlsAllowInvalidCertificates\" URI option instead.");
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Failed to parse \"%s\" driver option","local_cert");
returnfalse;
}
php_error_docref(NULL,E_DEPRECATED,"The \"local_cert\" context driver option is deprecated. Please use the \"tlsCertificateKeyFile\" URI option instead.");
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Failed to parse \"%s\" driver option","pem_pwd");
returnfalse;
}
php_error_docref(NULL,E_DEPRECATED,"The \"pem_pwd\" driver option is deprecated. Please use the \"tlsCertificateKeyFilePassword\" URI option instead.");
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Failed to parse \"%s\" driver option","passphrase");
returnfalse;
}
php_error_docref(NULL,E_DEPRECATED,"The \"passphrase\" context driver option is deprecated. Please use the \"tlsCertificateKeyFilePassword\" URI option instead.");
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENTTSRMLS_CC,"Expected \"%s\" handshake option to be a string, %s given",key,PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(zvalue));
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENTTSRMLS_CC,"Expected \"driver\" driver option to be an array, %s given",PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(driver));
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected \"autoEncryption\" driver option to be array, %s given",PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(zAutoEncryptionOpts));
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected \"keyVaultClient\" encryption option to be %s, %s given",ZSTR_VAL(php_phongo_manager_ce->name),PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(key_vault_client));
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected \"keyVaultClient\" encryption option to be %s, %s given",ZSTR_VAL(php_phongo_manager_ce->name),PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(key_vault_client));
phongo_throw_exception(PHONGO_ERROR_LOGIC,"Iterating over too many keyAltNames. Please file a bug report");
failed=true;
break;
}
if(Z_TYPE_P(keyaltname)!=IS_STRING){
if(string_key){
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected keyAltName with index \"%s\" to be string, %s given",ZSTR_VAL(string_key),PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(keyaltname));
}else{
phongo_throw_exception(PHONGO_ERROR_INVALID_ARGUMENT,"Expected keyAltName with index \"%lu\" to be string, %s given",num_key,PHONGO_ZVAL_CLASS_OR_TYPE_NAME_P(keyaltname));
phongo_throw_exception(domain,"%s Please recompile with support for libmongocrypt using the with-mongodb-client-side-encryption configure switch.",message);