Jump to content

Whmcs version 8.2.1, updateclientdomain.php , not work


persis

Recommended Posts

Hello every one

this code not work with updateclientdomain.php (v8.2.1) but worked with updateclientdomain.php(v8.1.2)

 

updateclientdomain.php in Version:8.2.1 (8.2.1-release.1) not work

updateclientdomain.php in Version:8.1.3 (8.1.3-release.1) working

https://developers.whmcs.com/api-reference/updateclientdomain/

This code update client domains with Domain pricing every day by cron(very helpful)

<?php

use WHMCS\Database\Capsule;

add_hook('AfterCronJob', 1, function($vars)
{
    $adminUsername = ''; // Optional for WHMCS 7.2 and later
    
    foreach (Capsule::table('tbldomains')->pluck('id') as $v)
    {
        localAPI('UpdateClientDomain', array('domainid' => $v, 'autorecalc' => true), $adminUsername);
    }

});

 

can any body help me to resolve this problem?

updateclientdomain(v8.2.1).php updateclientdomain (v8.1.3).php

Edited by persis
Link to comment
Share on other sites

Array
(
    [result] => error
    [message] => SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'where `id` = ?' at line 1 (SQL: update `tbldomains` set  where `id` = 3)
)

Link to comment
Share on other sites

  • WHMCS Technical Analyst II

Hi @persis

Thanks for your post!

The issue you report has been resolved in version 8.3 of WHMCS: https://docs.whmcs.com/Changelog:WHMCS_V8.3.0_Beta_1

Quote

CORE-16847 - Prevent erroneous SQL error when there is no change regarding autocalc request to UpdateClientDomain

Once version 8.3 reaches stable release tier, updating to it will resolve this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated