HTTP ERROR 500 – troubleshooting functions.php
-
Hi there
Thank you for creating what looks to be an incredibly useful plugin, that will be helping many folks with CSP-related headaches!
When I enable tag capture, our website crashes with a ‘HTTP ERROR 500’ message. From a lot of trial and error I established that removing this ‘show_content_snippet’ function from functions.php stops the crash happening, but it is pretty crucial to our site working properly. Do you have any ideas why this would be interfering with your plugin? Many thanks!
*/ function show_content_snippet( $post, $amount = 100 ) {
$post = (array)$post;
if( $post[‘post_excerpt’] !== ” ) {
echo apply_filters( ‘the_excerpt’, $post[‘post_excerpt’] );
}elseif( preg_match( ‘##is’, $post[‘post_content’] ) ) {
$moreSplit = explode( ”, apply_filters( ‘the_content’, $post[‘post_content’] ) );
echo $moreSplit[0];
}else{
echo ” . substr( strip_tags( $post[‘post_content’] ), 0, $amount ) . ‘…’;
}
}The page I need help with: [log in to see the link]
- The topic ‘HTTP ERROR 500 – troubleshooting functions.php’ is closed to new replies.