How to Fix PHP Fatal error Uncaught Error: Call to undefined method Sensei_Blocks::has_sensei_blocks()

I started getting this error after pushing a staging site to live from Scriptaculous:

PHP Fatal error Uncaught Error: Call to undefined method Sensei_Blocks::has_sensei_blocks() in /.../wp-content/plugins/woothemes-sensei/plugins/sensei-lms/includes/sensei-functions.php:38

Stack trace:

#0 /.../wp-content/plugins/woothemes-sensei/plugins/sensei-lms/includes/class-sensei.php(1269): is_sensei()
#1 /.../wp-includes/class-wp-hook.php(305): Sensei_Main-body_class(Array)
#2 /.../wp-includes/plugin.php(189): WP_Hook-apply_filters(Array, Array)

Parse an uploaded CSV file in 2 lines in PHP/CakePHP

Nasty but gets it done:

$delim = ','; $enc = '"'; $line = "\n";
foreach( str_getcsv ( file_get_contents( $tmpname ), $line ) as $row ) $csv[] = str_getcsv( $row, $delim, $enc ); // print_r( $csv );

or, if you want …

CakePHP 1.1.x, Vendors, and domPDF

Wow – for a built in feature, this sure was a pain in the ass to get working. Β I’m talking about using the ‘vendors’ functionality in CakePHP 1.1.x (I’m at .19), of course, and in this case, my external class …