• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • Cannot use a scalar value as an array

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Cannot use a scalar value as an array

    • Issue Tools
      • View Changes
    1. issueid=4713 September 3, 2016 9:48 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Cannot use a scalar value as an array

      XF forum fails:
      Code:
      An exception occurred: Cannot use a scalar value as an array in /vault/core/model/permissions/vw.php on line 678
      1.	XenForo_Application::handlePhpError() in /vault/core/model/permissions/vw.php at line 678
      2.	vw_Permissions_Model->process_flatten() in /vault/core/model/permissions/vw.php at line 406
      3.	vw_Permissions_Model->process() in /vault/core/model/permissions/vw.php at line 137
      4.	vw_Permissions_Model->get() in /vault/core/model/ui/tab/area/vw.php at line 30
      5.	vw_UI_Tab_Area_Model->can_main_tab() in /vault/core/model/ui/tab/vw.php at line 58
      6.	vw_UI_Tab_Model->check() in /vault/core/model/area/vw.php at line 64
      7.	vw_Area_Model->get_visible_areas() in /vault/core/model/plugins/forum/vw.php at line 268
      8.	vw_Plugins_Forum_Model->statistics_block() in vw/XenForo/ViewPublic/Forum/List.php at line 29
      9.	vw_XenForo_ViewPublic_Forum_List->renderHtml() in NFLJ/AMS/XenForo/ViewPublic/Forum/List.php at line 9
      10.	NFLJ_AMS_XenForo_ViewPublic_Forum_List->renderHtml() in CTA/FeaturedThreads/ViewPublic/Forum/List.php at line 7
      11.	CTA_FeaturedThreads_ViewPublic_Forum_List->renderHtml() in XenForo/ViewRenderer/Abstract.php at line 227
      12.	XenForo_ViewRenderer_Abstract->renderViewObject() in XenForo/ViewRenderer/HtmlPublic.php at line 71
      13.	XenForo_ViewRenderer_HtmlPublic->renderView() in XenForo/FrontController.php at line 606
      14.	XenForo_FrontController->renderView() in XenForo/FrontController.php at line 158
      15.	XenForo_FrontController->run() in /index.php at line 13
      16.	array(3) {
      17.	  ["url"] => string(47) "https://site.com/forums/"
      18.	  ["_GET"] => array(0) {
      19.	  }
      20.	  ["_POST"] => array(0) {
      21.	  }
      22.	}
    Issue Details
    Issue Number 4713
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Headers / Wiki Blocks
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 4.0.13
    Fixed Version 4.0.14
    Milestone (none)
    Software DependencyXenForo 1.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. September 4, 2016 9:37 AM
      pegasus pegasus is offline
      VaultWiki Team
      I think this will happen if, even after all permissions are inherited to the current user, the user still has no permissions defined at all (not even saved as "No") for Sidebar Blocks. I believe this would occur if all sidebar blocks in the admin panel are deleted and there are currently none.

      In vault/core/model/permissions/vw.php, find:
      Code:
      	protected function process_flatten()
      	{
      		$permissions = array();
      
      		foreach ($this->output AS $field => $values)
      		{
      After it, add:
      Code:
      $tmp = null;
      Reply Reply
    2. September 4, 2016 12:26 PM
      Alfa1 Alfa1 is offline
      Distinguished Member
      Thank you!
      Reply Reply
    3. September 17, 2016 12:50 PM
      pegasus pegasus is offline
      VaultWiki Team
      In all cases, the user must be in a group that has Attachment Permissions. Given that, there are several ways this can happen:
      - An improper upgrade from < 4.0.1, OR
      - An improper installation, OR
      - In the Lite version, the user was only a member of non-Administrator groups that never had their Sidebar Permissions changed from the default values, but whose permissions of any other type were changed, and then the Lite version was upgraded to the full version, OR
      - The user is only a member of groups that were created after all VaultWiki blocks were created and was never explicitly granted Sidebar Permissions, OR
      - The user is a member of a group that was explicitly denied all Sidebar Permissions at some point, even if they were later given Sidebar Permissions again, OR
      - The user is a member of a group that was given a Never value for any single Sidebar Permission, OR
      - The user is a member of a group that was given a Never value for any single permission of a type other than Book, Category, Feed, Redirect, and a Never value for any single Attachment Permission.

      There may be other situations, but these are the ones I've been able to rationalize so far. I wanted to make sure that this error was not caused by any missing or invalid data, and that the above edit is all that is needed to correct the issue. Aside from improper install/upgrade above, while some of the cases might suggest behavior inconsistencies that should be addressed, none of the cases suggest any data problems, so no further attention to this issue is needed at this time.
      Reply Reply
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 4:55 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.