Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: array_key_exists(): The first argument should be either a string or an integer in {redacted local path}\vendor\vlucas\phpdotenv\src\Environment\Adapter\EnvConstAdapter.php on line 29 #350

Closed
westernstatesflooring opened this issue Mar 5, 2019 · 3 comments

Comments

@westernstatesflooring
Copy link

Hello,

I just upgraded Laravel 5.7 to 5.8 and now I'm getting the following error whenever loading the site as well as in the terminal.

Warning: array_key_exists(): The first argument should be either a string or an integer in {redacted local path}\vendor\vlucas\phpdotenv\src\Environment\Adapter\EnvConstAdapter.php on line 29

Warning: array_key_exists(): The first argument should be either a string or an integer in {redacted local path}\vendor\vlucas\phpdotenv\src\Environment\Adapter\ServerConstAdapter.php on line 29

Not sure if this is helpful, but when I print_r($name) just before line 29 on these files here is the output.

APP_ENVAPP_NAMEAPP_ENVAPP_KEYAPP_DEBUGAPP_URLLOG_CHANNELDB_CONNECTIONDB_HOSTDB_PORTDB_DATABASEDB_USERNAMEDB_PASSWORDLDAP_AUTO_CONNECTLDAP_ACCOUNT_PREFIXLDAP_ACCOUNT_SUFFIXLDAP_HOSTSLDAP_PORTLDAP_TIMEOUTLDAP_BASE_DNLDAP_USERNAMELDAP_PASSWORDLDAP_USE_SSLLDAP_USE_TLSBROADCAST_DRIVERCACHE_DRIVERQUEUE_CONNECTIONSESSION_DRIVERSESSION_LIFETIMEREDIS_HOSTREDIS_PASSWORDREDIS_PORTMAIL_DRIVERMAIL_HOSTMAIL_PORTMAIL_USERNAMEMAIL_PASSWORDMAIL_ENCRYPTIONPUSHER_APP_IDPUSHER_APP_KEYPUSHER_APP_SECRETPUSHER_APP_CLUSTERPUSHER_APP_KEYMIX_PUSHER_APP_KEYPUSHER_APP_CLUSTERMIX_PUSHER_APP_CLUSTERAPP_NAMEAPP_ENVAPP_DEBUGAPP_URLASSET_URLAPP_KEYAPP_ENVBACKPACK_REGISTRATION_OPENBACKPACK_LICENSEBROADCAST_DRIVERPUSHER_APP_KEYPUSHER_APP_SECRETPUSHER_APP_IDPUSHER_APP_CLUSTERCACHE_DRIVERMEMCACHED_PERSISTENT_IDMEMCACHED_USERNAMEMEMCACHED_PASSWORDMEMCACHED_HOSTMEMCACHED_PORTAPP_NAMECACHE_PREFIXDB_CONNECTIONDB_DATABASEDB_FOREIGN_KEYSDB_HOSTDB_PORTDB_DATABASEDB_USERNAMEDB_PASSWORDDB_SOCKETDB_HOSTDB_PORTDB_DATABASEDB_USERNAMEDB_PASSWORDDB_HOSTDB_PORTDB_DATABASEDB_USERNAMEDB_PASSWORDREDIS_HOSTREDIS_PASSWORDREDIS_PORTREDIS_DBREDIS_HOSTREDIS_PASSWORDREDIS_PORTREDIS_CACHE_DBFILESYSTEM_DRIVERFILESYSTEM_CLOUDAPP_URLAWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGIONAWS_BUCKETAWS_URLBCRYPT_ROUNDSLDAP_AUTO_CONNECTLDAP_ACCOUNT_PREFIXLDAP_ACCOUNT_SUFFIXLDAP_HOSTSLDAP_PORTLDAP_TIMEOUTLDAP_BASE_DNLDAP_USERNAMELDAP_PASSWORDLDAP_USE_SSL
LDAP_CONNECTIONLDAP_PASSWORD_SYNCLDAP_LOGIN_FALLBACKLOG_CHANNELLOG_SLACK_WEBHOOK_URLPAPERTRAIL_URLPAPERTRAIL_PORTLOG_STDERR_FORMATTERMAIL_DRIVERMAIL_HOSTMAIL_PORTMAIL_FROM_ADDRESSMAIL_FROM_NAMEMAIL_ENCRYPTIONMAIL_USERNAMEMAIL_PASSWORDMAIL_LOG_CHANNELQUEUE_CONNECTIONSQS_KEYSQS_SECRETSQS_PREFIXSQS_QUEUESQS_REGIONREDIS_QUEUEDB_CONNECTIONMAILGUN_DOMAINMAILGUN_SECRETMAILGUN_ENDPOINTSES_KEYSES_SECRETSES_REGIONSPARKPOST_SECRETSTRIPE_KEYSTRIPE_SECRETSTRIPE_WEBHOOK_SECRETSTRIPE_WEBHOOK_TOLERANCESESSION_DRIVERSESSION_LIFETIMESESSION_CONNECTIONSESSION_STOREAPP_NAMESESSION_COOKIESESSION_DOMAINSESSION_SECURE_COOKIEVIEW_COMPILED_PATHAPP_ENVBACKPACK_REGISTRATION_OPENBACKPACK_LICENSE

@GrahamCampbell
Copy link
Collaborator

It looks like you are calling env(null) somewhere, which is causing this warning. I might update the codebase to throw an exception so you can see a full stacktrace.

@GrahamCampbell
Copy link
Collaborator

@westernstatesflooring Please try with #351. This should show you were your bad function call is.

@westernstatesflooring
Copy link
Author

#351 created the exception report, found the stupid error in one of my config files. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants