WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
undefined index https (3 posts)

  1. jaxspace
    Member
    Posted 3 years ago #

    the plugin checks for $_SERVER['HTTPS'] to see if https is enabled.
    on http php does not set the variable.

    patch to avoid notice: Notice: Undefined index: HTTPS in .../domain_mapping.php on line 491

    491c491
    < 		$protocol = ( 'on' == strtolower( $_SERVER['HTTPS' ] ) ) ? 'https://' : 'http://';
    ---
    > 		$protocol = ( isset($_SERVER['HTTPS']) && 'on' == strtolower( $_SERVER['HTTPS' ] ) ) ? 'https://' : 'http://';

    http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/

  2. jaxspace
    Member
    Posted 3 years ago #

    created another fix for the deprecated function is_site_admin()

    53c53
    < 	if( is_site_admin() ) {
    ---
    > 	if( is_super_admin() ) {
    90c90
    < 	if ( is_site_admin() ) {
    ---
    > 	if ( is_super_admin() ) {
    122c122
    < 	if ( false == is_site_admin() ) { // paranoid? moi?
    ---
    > 	if ( !is_super_admin() ) { // paranoid? moi?
    239c239
    < 	if ( false == is_site_admin() ) { // paranoid? moi?
    ---
    > 	if ( !is_super_admin() ) { // paranoid? moi?
    365c365
    < 		if ( is_site_admin() ) {
    ---
    > 		if ( is_super_admin() ) {
    374c374
    < 		if ( is_site_admin() ) {
    ---
    > 		if ( is_super_admin() ) {
    383c383
    < 		if ( is_site_admin() ) {
    ---
    > 		if ( is_super_admin() ) {
    405c405
    < 		if ( is_site_admin() ) {
    ---
    > 		if ( is_super_admin() ) {
  3. Adam Backstrom
    Member
    Posted 3 years ago #

    Better still, use is_ssl() (available since WP 2.6).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic