Ticket #12482: fix_12482_mythweb_recommend_enabled.patch

File fix_12482_mythweb_recommend_enabled.patch, 841 bytes (added by Patrick Mansfield <patman@…>, 4 years ago)

Patch to fix the problem.

  • modules/mythweb/set_recommend.php

    commit 5de569026a5c72caa810386a0115d1dca8248626
    Author: Patrick Mansfield <patman@aracnet.com>
    Date:   Sun Nov 13 10:14:29 2016 -0800
    
        Set recommend_enabled to either 0 or 1, and not to an empty value.
        
        Fixes #12482
        
        Without this change, mythweb fails if you try to enable recommended videos.
    
    diff --git a/modules/mythweb/set_recommend.php b/modules/mythweb/set_recommend.php
    index ef47f94..36ebefa 100644
    a b  
    1111
    1212// Save?
    1313    if ($_POST['save']) {
    14                 setting('recommend_enabled', null, $_POST['recommend_enabled']);
     14                setting('recommend_enabled', null, $_POST['recommend_enabled'] ? 1 : 0);
    1515                setting('recommend_server', null, $_POST['recommend_server']);
    1616                setting('recommend_key', null, $_POST['recommend_key']);
    1717    }