Title: Plugin causes an error
Last modified: July 9, 2024

---

# Plugin causes an error

 *  Resolved [rainmanne](https://wordpress.org/support/users/rainmanne/)
 * (@rainmanne)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/plugin-causes-en-error/)
 * Every time I make a post or update an existing post, Share on Mastodon gives 
   me an error. This is from the automatic email:
 * WordPress version 6.5.5
   Active theme: OceanWP (version 3.5.7)Current plugin: 
   Share on Mastodon (version 0.19.0)PHP version 7.4.33 Error Details
 * An error of type E_ERROR was caused in line 179 of the file /home/domain/website/
   wp-content/plugins/share-on-mastodon/includes/class-image-handler.php. Error 
   message: Uncaught Error: Call to undefined function Share_On_Mastodon\mime_content_type()
   in /home/domain/website/wp-content/plugins/share-on-mastodon/includes/class-image-
   handler.php:179
   Stack trace:
 * 0 /home/domain/website/wp-content/plugins/share-on-mastodon/includes/class-post-
   handler.php(212): Share_On_Mastodon\Image_Handler::upload_image(5201, ‘KINSHI
   MASAMUNE…’, Array)
 * /home/domain/website/wp-content/plugins/share-on-mastodon/includes/class-post-
   handler.php(129): Share_On_Mastodon\Post_Handler->post_to_mastodon(Object(WP_Post))
 * /home/domain/website/wp-includes/class-wp-hook.php(326): Share_On_Mastodon\Post_Handler-
   >toot(Object(WP_Post))
 * /home/domain/website/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(
   NULL, Array)
 * /home/domain/website/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
 * /home/domain/website/wp-includes/post.php(4817): do_action(‘sa
 * The post is published OK, but never shared on Mastodon.
    -  This topic was modified 1 year, 10 months ago by [rainmanne](https://wordpress.org/support/users/rainmanne/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Jan Boddez](https://wordpress.org/support/users/janboddez/)
 * (@janboddez)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/plugin-causes-en-error/#post-17879166)
 * It looks like you have PHP installed without the [mime_content_type function](https://www.php.net/manual/en/function.mime-content-type.php)(
   or rather, the Fileinfo extension). Or that your web host has somehow disabled
   it.
 * I’ll make sure to check for this in a next version of the plugin, although it
   could still mean posting images is not possible from your specific WordPress 
   installation (but at least things wouldn’t break horribly anymore).
 * Alternatively, I may be able to do a quick and dirty check based on file extension(
   which of course requires that your image have valid extensions). This wouldn’t
   be as “clean,” but it’s not really an issue (in the end it’s up to Mastodon to
   properly validate media files).
 * Update: I think I may be able to cook up a valid fallback. Meanwhile, it’d be
   worth asking your hosting provider if or why this extension/function is disabled/
   blocked. They may be able to still enable it for you.
    -  This reply was modified 1 year, 10 months ago by [Jan Boddez](https://wordpress.org/support/users/janboddez/).
 *  Plugin Author [Jan Boddez](https://wordpress.org/support/users/janboddez/)
 * (@janboddez)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/plugin-causes-en-error/#post-17879579)
 * Think I have a working fix, still have to release it, though. Give it a day or
   two!
 *  Plugin Author [Jan Boddez](https://wordpress.org/support/users/janboddez/)
 * (@janboddez)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/plugin-causes-en-error/#post-17911646)
 * Hi again, took a bit longer than a day or two, but version 0.19.1 should fix 
   this.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Plugin causes an error’ is closed to new replies.

 * ![](https://ps.w.org/share-on-mastodon/assets/icon-256x256.png?rev=2939211)
 * [Share on Mastodon](https://wordpress.org/plugins/share-on-mastodon/)
 * [Support Threads](https://wordpress.org/support/plugin/share-on-mastodon/)
 * [Active Topics](https://wordpress.org/support/plugin/share-on-mastodon/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/share-on-mastodon/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/share-on-mastodon/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jan Boddez](https://wordpress.org/support/users/janboddez/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/plugin-causes-en-error/#post-17911646)
 * Status: resolved