diff --git a/lib/Plugin.class.php b/lib/Plugin.class.php index b248a9c..781528a 100644 --- a/lib/Plugin.class.php +++ b/lib/Plugin.class.php @@ -309,12 +309,16 @@ public function processEditorStylesheets($mce_css) { // Remove version from uri $parts = parse_url( $style_sheet ); + + $parts['port'] = (isset($parts['port'])) ? $parts['port'] : false; + $parts['path'] = (isset($parts['path'])) ? $parts['path'] : ''; + $style_sheet = $parts['scheme'] . '://' . $parts['host'] . (!$parts['port'] ? '' : (':' . $parts['port'])) . $parts['path']; // Get extension and set handle for wp_register_style() $pathinfo = pathinfo($style_sheet); - $extension = $pathinfo['extension']; - $handle = $pathinfo['filename']; + $extension = (isset($pathinfo['extension'])) ? $pathinfo['extension'] : ''; + $handle = (isset($pathinfo['filename'])) ? $pathinfo['filename'] : ''; // Only process less files if( $extension === 'less' ) {