Causes CLI errors because SERVER_NAME is not available
-
Every time I used WP-CLI, I got this error: Notice: Undefined index: SERVER_NAME
That’s because SERVER_NAME is not available via command line. There is a fix though.
Edit the file:
postman-smtp/Postman/Postman-Mail/PostmanDefaultModuleTransport.phpChange this (line 37):
$sitename = strtolower ( $_SERVER ['SERVER_NAME'] );To this:
$siteurl = parse_url( esc_url( site_url() ) ); $sitename = $siteurl['host'];Works fine now π
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Causes CLI errors because SERVER_NAME is not available’ is closed to new replies.