First, thanks for mobile codes, great module!

There are some PHP Notices being generated for several of the includes.:

Notice: Undefined property: stdClass::$disabled in mobile_codes/includes/filefield.inc on line 13
Notice: Undefined property: stdClass::$disabled in mobile_codes/includes/text.inc on line 13
etc.

It's the common PHP issue of attempting to check the value of a variable that is not set, the patch below checks that the variale is set before it is checked.

CommentFileSizeAuthor
#1 1303746_includes_php_notices.patch5.41 KBFeng-Shui
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Feng-Shui’s picture

Patch attached

bleen’s picture

Status: Active » Needs work
+++ b/mobile_codes/includes/block.incundefined
@@ -147,7 +147,7 @@ function mobile_codes_block_generate_code_form(&$form_state) {
-    if (!$preset->disabled) {
+    if (isset($preset->disabled) && !$preset->disabled) {

This will not work correctly if $preet->disabled is not set. In that case, the assumption is that the object is NOT disabled, yet the if statement will resolve to FALSE and the code inside it will never get fired off